locationmgmt/locationcore/src/lbsadmin.cpp
changeset 0 9cfd9a3ee49c
equal deleted inserted replaced
-1:000000000000 0:9cfd9a3ee49c
       
     1 // Copyright (c) 2006-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 //
       
    15 
       
    16 #include <e32base.h>
       
    17 
       
    18 #include "lbsdevloggermacros.h"
       
    19 #include <lbs/lbsadmin.h>
       
    20 #include "lbsadminimpl.h"
       
    21 #include "LbsInternalInterface.h"
       
    22 #include "lbsqualityprofile.h"
       
    23 
       
    24 
       
    25 //********************************************************************************************************
       
    26 // Version of the admin API
       
    27 const TInt8 KLbsAdminMajorVersion = 1;
       
    28 const TInt8 KLbsAdminMinorVersion = 0;
       
    29 const TInt16 KLbsAdminBuild       = 0;
       
    30 
       
    31 
       
    32 
       
    33 //********************************************************************************************************
       
    34 // Class CLbsAdmin - Public Methods
       
    35 //********************************************************************************************************
       
    36 /** Static constructor.
       
    37 @return A pointer to the new CLbsAdmin object.
       
    38 @capability WriteDeviceData if the configuration settings need to be created/initialised, none otherwise
       
    39 @released*/
       
    40 EXPORT_C CLbsAdmin* CLbsAdmin::NewL()
       
    41 	{
       
    42 	LBSLOG(ELogP9, "->S CLbsAdmin::NewL() LbsAdmin\n");
       
    43 
       
    44 	CLbsAdmin* self = new(ELeave)CLbsAdmin();
       
    45 	CleanupStack::PushL(self);
       
    46 	self->ConstructL();
       
    47 	CleanupStack::Pop(self);
       
    48 	return self;
       
    49 	}
       
    50 
       
    51 
       
    52 /** Static constructor.
       
    53 @param   aObserver       A object that will be receiving the call-backs
       
    54 @param   aSettingsMask   A bit mask containing all the Settings a user should be notified about.
       
    55 						 Default value is KLbsSettingNone.
       
    56 
       
    57 It is possible to change the bitmask using the RequestSettingUpdateEventL() method.
       
    58 
       
    59 @return A pointer to the new CLbsAdmin object.
       
    60 @capability WriteDeviceData if the configuration settings need to be created/initialised, none otherwise
       
    61 @released*/
       
    62 EXPORT_C CLbsAdmin* CLbsAdmin::NewL(MLbsAdminObserver& aObserver, const TLbsAdminSettingGroup& aSettingsMask)
       
    63 	{
       
    64 	LBSLOG(ELogP9, "->S CLbsAdmin::NewL(2) LbsAdmin\n");
       
    65 	LBSLOG2(ELogP9, "  > MLbsAdminObserver aObserver  = 0x%X", &aObserver);
       
    66 	LBSLOG2(ELogP9, "  > TLbsAdminSettingGroup aSettingsMask  = 0x%016X\n", aSettingsMask);
       
    67 
       
    68 	CLbsAdmin* self = new(ELeave)CLbsAdmin();
       
    69 	CleanupStack::PushL(self);
       
    70 	self->ConstructL(aObserver, aSettingsMask);
       
    71 	CleanupStack::Pop(self);
       
    72 	return self;
       
    73 	}
       
    74 
       
    75 	
       
    76 /** Second phase constructor 
       
    77 @capability WriteDeviceData if the configuration settings need to be created/initialised, none otherwise
       
    78 @released*/	
       
    79 void CLbsAdmin::ConstructL()
       
    80 	{
       
    81 	LBSLOG(ELogP1, "CLbsAdmin::ConstructL()");
       
    82 	iImpl = CLbsAdminImpl::NewL();
       
    83 	}		
       
    84 
       
    85 
       
    86 /** Second phase constructor 
       
    87 @param   aObserver       A object that will be receiving the call-backs
       
    88 @param   aSettingsMask   A bit mask containing all the Settings a user should be nitified about.
       
    89 
       
    90 It is possible to change the bitmask using the RequestSettingUpdateEventL() method. 
       
    91 @capability WriteDeviceData if the configuration settings need to be created/initialised, none otherwise
       
    92 @released*/	
       
    93 void CLbsAdmin::ConstructL(MLbsAdminObserver& aObserver, const TLbsAdminSettingGroup& aSettingsMask)
       
    94 	{
       
    95 	LBSLOG(ELogP1, "CLbsAdmin::ConstructL(aObserver, aSettingsMask)");
       
    96 	iImpl = CLbsAdminImpl::NewL(aObserver, aSettingsMask);
       
    97 	}		
       
    98 
       
    99 
       
   100 /** Default constructor 
       
   101 @released*/
       
   102 CLbsAdmin::CLbsAdmin():
       
   103 iImpl(NULL)
       
   104 	{
       
   105 	LBSLOG(ELogP1, "CLbsAdmin::CLbsAdmin()");
       
   106 	}
       
   107 
       
   108 
       
   109 /** Default destructor */
       
   110 CLbsAdmin::~CLbsAdmin()
       
   111 	{
       
   112 	LBSLOG(ELogP9, "->S CLbsAdmin::~CLbsAdmin() LbsAdmin\n");
       
   113 	delete iImpl;
       
   114 	}
       
   115 
       
   116 	
       
   117 /** Requests a notification (callback) if the value of one or more of the given settings changes.
       
   118 It replaces a previous request, either passed through NewL(...) or RequestSettingUpdateEventL(...).
       
   119 
       
   120 Events will continue to be delivered to the supplied observer until the CLbsAdmin object exists
       
   121 or CancelSettingEvent() is called.
       
   122 
       
   123 @param   aSettingsMask   A bit mask containing all the Settings a user should be nitified about.
       
   124 @leave   KErrorArgument, KErrNoMemory or one of the other system wide error codes
       
   125 
       
   126 @panic EAdminObserverNotDefined If an observer has not been specified in the static constructor - NewL(...)
       
   127 @see TLbsAdminSetting
       
   128 @see MLbsAdminObserver
       
   129 @released*/
       
   130 EXPORT_C void CLbsAdmin::SetNotificationMaskL(const TLbsAdminSettingGroup& aSettingsMask)
       
   131 	{
       
   132 	LBSLOG(ELogP9, "->S CLbsAdmin::SetNotificationMaskL() LbsAdmin\n");
       
   133 	LBSLOG2(ELogP9, "  > TLbsAdminSettingGroup aSettingsMask  = 0x%016X\n", aSettingsMask);
       
   134 
       
   135 	iImpl->SetNotificationMaskL(aSettingsMask);
       
   136 	}
       
   137 
       
   138 	
       
   139 /** Cancels an outstanding setting event request
       
   140 @see TLbsAdminSetting
       
   141 @released*/
       
   142 EXPORT_C void CLbsAdmin::ClearNotificationMask()
       
   143 	{
       
   144 	LBSLOG(ELogP9, "->S CLbsAdmin::ClearNotificationMask() LbsAdmin\n");
       
   145 
       
   146 	iImpl->ClearNotificationMask();
       
   147 	}
       
   148 
       
   149 
       
   150 /** Resets all the settings to their default states.
       
   151 A licensee may define own default values.
       
   152 @return KErrNone if successful, one of the system wide error codes otherwise.
       
   153 @released*/
       
   154 EXPORT_C TInt CLbsAdmin::ResetToDefault()
       
   155 	{
       
   156 	LBSLOG(ELogP9, "->S CLbsAdmin::ResetToDefault() LbsAdmin\n");
       
   157 	
       
   158 	TInt err = iImpl->ResetToDefault();
       
   159 	LBSLOG2(ELogP9, "  Return  = %d\n", err);
       
   160 	return err;
       
   161 	}
       
   162 
       
   163 
       
   164 //********************************************************************************************************
       
   165 // Class CLbsAdmin - Private Methods
       
   166 //********************************************************************************************************
       
   167 /** Sets the KLbsSettingHomeSelfLocate or KLbsSettingRoamingSelfLocate settings.
       
   168 @param aSetting The setting to be changed.
       
   169 @param aValue   The new value of the setting.
       
   170 @return KErrNone if successful, KErrArgument if the value is out of range, KErrNotSupported if the value is not supported and one of the system wide error codes otherwise.
       
   171 @capability WriteDeviceData
       
   172 @see TLbsAdminSetting
       
   173 @released*/
       
   174 EXPORT_C TInt CLbsAdmin::DoSet(const TLbsAdminSetting& aSetting, const TSelfLocateService& aValue)
       
   175 	{
       
   176 	LBSLOG(ELogP9, "->S CLbsAdmin::Set(TSelfLocateService) LbsAdmin\n");
       
   177 	LBSLOG2(ELogP9, "  > TLbsAdminSetting aSetting  = 0x%016X\n", aSetting);
       
   178 	LBSLOG2(ELogP9, "  > TSelfLocateService aValue  = 0x%02X\n", aValue);
       
   179 	
       
   180 	TInt err = KErrArgument;
       
   181 
       
   182 	if ((aSetting == KLbsSettingHomeSelfLocate) || (aSetting == KLbsSettingRoamingSelfLocate))
       
   183 		{
       
   184 		err = iImpl->SetSettingValidated(aSetting, aValue);
       
   185 		}
       
   186 	
       
   187 	LBSLOG2(ELogP9, "  Return  = %d\n", err);
       
   188 	return err;
       
   189 	}
       
   190 
       
   191 
       
   192 /** Sets the KLbsSettingHomeExternalLocate, KLbsSettingRoamingExternalLocate,
       
   193     KLbsSettingHomeEmergencyLocate KLbsSettingRoamingEmergencyLocate settings.
       
   194 @param aSetting The setting to be changed.
       
   195 @param aValue   The new value of the setting.
       
   196 @return KErrNone if successful,KErrArgument if the value is out of range and one of the system wide error codes otherwise.
       
   197 @capability WriteDeviceData
       
   198 @see TLbsAdminSetting
       
   199 @released*/
       
   200 EXPORT_C TInt CLbsAdmin::DoSet(const TLbsAdminSetting& aSetting, const TExternalLocateService& aValue)
       
   201 	{
       
   202 	LBSLOG(ELogP9, "->S CLbsAdmin::Set(TExternalLocateService) LbsAdmin\n");
       
   203 	LBSLOG2(ELogP9, "  > TLbsAdminSetting aSetting  = 0x%016X\n", aSetting);
       
   204 	LBSLOG2(ELogP9, "  > TExternalLocateService aValue  = 0x%02X\n", aValue);
       
   205 
       
   206 	TInt err = KErrArgument;
       
   207 
       
   208 	if ((aSetting == KLbsSettingHomeExternalLocate) || (aSetting == KLbsSettingRoamingExternalLocate) ||
       
   209 	    (aSetting == KLbsSettingHomeEmergencyLocate) || (aSetting == KLbsSettingRoamingEmergencyLocate) ||
       
   210 		(aSetting == KLbsSettingHomeNetworkInducedLocate) || (aSetting == KLbsSettingRoamingNetworkInducedLocate))
       
   211 		{
       
   212 		err = iImpl->SetSettingValidated(aSetting, aValue);
       
   213 		}
       
   214 
       
   215 	LBSLOG2(ELogP9, "  Return  = %d\n", err);
       
   216 	return err;
       
   217 	}
       
   218 
       
   219 
       
   220 /** Sets the KLbsSettingHomeTransmitLocate or KLbsSettingRoamingTransmitLocate setting.
       
   221 @param aSetting The setting to be changed.
       
   222 @param aValue   The new value of the setting.
       
   223 @return KErrNone if successful,KErrArgument if the value is out of range and one of the system wide error codes otherwise.
       
   224 @capability WriteDeviceData
       
   225 @see TLbsAdminSetting
       
   226 @released*/
       
   227 EXPORT_C TInt CLbsAdmin::DoSet(const TLbsAdminSetting& aSetting, const TTransmitLocateService& aValue)
       
   228 	{
       
   229 	LBSLOG(ELogP9, "->S CLbsAdmin::Set(TransmitLocateService) LbsAdmin\n");
       
   230 	LBSLOG2(ELogP9, "  > TLbsAdminSetting aSetting  = 0x%016X\n", aSetting);
       
   231 	LBSLOG2(ELogP9, "  > TTransmitLocateService aValue  = 0x%02X\n", aValue);
       
   232 	
       
   233 	TInt err = KErrArgument;
       
   234 
       
   235 	if ((aSetting == KLbsSettingHomeTransmitLocate) || (aSetting == KLbsSettingRoamingTransmitLocate))
       
   236 		{
       
   237 		err = iImpl->SetSettingValidated(aSetting, aValue);
       
   238 		}
       
   239 
       
   240 	LBSLOG2(ELogP9, "  Return  = %d\n", err);
       
   241 	return err;
       
   242 	}			
       
   243 
       
   244 
       
   245 /** Sets the KLbsSettingHomeGpsMode or KLbsSettingRoamingGpsMode settings.
       
   246 @param aSetting The setting to be changed.
       
   247 @param aValue   The new value of the setting.
       
   248 @return KErrNone if successful. KErrNotSupported if aValue set to EGpsModeUnknown, KLbsAlwaysTerminalAssisted or EGpsAlwaysTerminalAssisted. 
       
   249 KErrArgument if the value is out of range and One of the system wide error codes otherwise.
       
   250 @capability WriteDeviceData
       
   251 @see TLbsAdminSetting
       
   252 @released*/
       
   253 
       
   254 EXPORT_C TInt CLbsAdmin::DoSet(const TLbsAdminSetting& aSetting, const TGpsMode& aValue)
       
   255 	{
       
   256 	LBSLOG(ELogP9, "->S CLbsAdmin::Set(TGpsMode) LbsAdmin\n");
       
   257 	LBSLOG2(ELogP9, "  > TLbsAdminSetting aSetting  = 0x%016X\n", aSetting);
       
   258 	LBSLOG2(ELogP9, "  > TGpsMode aValue  = 0x%02X\n", aValue);
       
   259 	
       
   260 	TInt err = KErrArgument;
       
   261 
       
   262 	if ((aSetting == KLbsSettingHomeGpsMode) || (aSetting == KLbsSettingRoamingGpsMode))
       
   263 		{
       
   264 		if (aValue == EGpsModeUnknown  || aValue == EGpsAlwaysTerminalBased)
       
   265 			{
       
   266 			err = KErrNotSupported;	
       
   267 			}
       
   268 		else
       
   269 			{
       
   270 			err = iImpl->SetSettingValidated(aSetting, aValue);
       
   271 			}	
       
   272 		}
       
   273 	
       
   274 	LBSLOG2(ELogP9, "  Return  = %d\n", err);
       
   275 	return err;
       
   276 	}
       
   277 	
       
   278 
       
   279 
       
   280 /** Sets the KLbsSettingQualityProfileSelfLocate or KLbsSettingQualityProfileExternalLocate 
       
   281     or KLbsSettingQualityProfileTransmitLocate settings.
       
   282 @param aSetting The setting to be changed.
       
   283 @param aValue   The new value of the setting.
       
   284 @return KErrNone if successful, one of the system wide error codes otherwise.
       
   285 @capability WriteDeviceData
       
   286 @see TLbsAdminSetting
       
   287 @released*/
       
   288 EXPORT_C TInt CLbsAdmin::DoSet(const TLbsAdminSetting& aSetting, const TLbsQualityProfileId& aValue)
       
   289 	{
       
   290 	LBSLOG(ELogP9, "->S CLbsAdmin::Set(TLbsQualityProfileId) LbsAdmin\n");
       
   291 	LBSLOG2(ELogP9, "  > TLbsAdminSetting aSetting  = 0x%016X\n", aSetting);
       
   292 	LBSLOG2(ELogP9, "  > TLbsQualityProfileId aValue  = %u\n", aValue);
       
   293 	
       
   294 	TInt err = KErrArgument;
       
   295 
       
   296 	if ((aSetting == KLbsSettingQualityProfileSelfLocate) || (aSetting == KLbsSettingQualityProfileExternalLocate) ||
       
   297 		(aSetting == KLbsSettingQualityProfileTransmitLocate))
       
   298 		{
       
   299 		//to validate quality profile Id
       
   300 		TQualityProfile temp;
       
   301 		err = LbsQualityProfile::GetQualityProfileById(aValue, temp);
       
   302 		if(KErrNone == err)
       
   303 			{
       
   304 			err = iImpl->SetSettingValidated(aSetting, aValue);
       
   305 			}
       
   306 		else
       
   307 			{
       
   308 			err = KErrArgument;
       
   309 			}
       
   310 		}
       
   311 
       
   312 	LBSLOG2(ELogP9, "  Return  = %d\n", err);
       
   313 	return err;
       
   314 	}
       
   315 	
       
   316 	
       
   317 /** Sets the KLbsSettingHomeProtocolModule and KLbsSettingRoamingProtocolModule 
       
   318 and KLbsSettingSetClockModule settings.
       
   319 @param aSetting The setting to be changed.
       
   320 @param aValue   The new value of the setting.
       
   321 @return KErrNone if successful, one of the system wide error codes otherwise.
       
   322 @capability WriteDeviceData
       
   323 @see TLbsAdminSetting
       
   324 @released*/
       
   325 EXPORT_C TInt CLbsAdmin::DoSet(const TLbsAdminSetting& aSetting, const TUid& aValue)
       
   326 	{
       
   327 	LBSLOG(ELogP9, "->S CLbsAdmin::Set(TUid) LbsAdmin\n");
       
   328 	LBSLOG2(ELogP9, "  > TLbsAdminSetting aSetting  = 0x%016X\n", aSetting);
       
   329 	LBSLOG2(ELogP9, "  > TUid aValue  = 0x%08X\n", aValue.iUid);
       
   330 
       
   331 	TInt err = KErrArgument;
       
   332 
       
   333 	if ((aSetting == KLbsSettingHomeProtocolModule) || (aSetting == KLbsSettingRoamingProtocolModule) ||
       
   334 		(aSetting == KLbsSettingSetClockModule))
       
   335 		{
       
   336 		err = iImpl->SetSettingValidated(aSetting, aValue.iUid);
       
   337 		}
       
   338 
       
   339 	LBSLOG2(ELogP9, "  Return  = %d\n", err);
       
   340 	return err;
       
   341 	}
       
   342 	
       
   343 	
       
   344 /** Sets the KLbsSettingLbsSystemStartMode setting.
       
   345 @param aSetting The setting to be changed.
       
   346 @param aValue   The new value of the setting.
       
   347 @return KErrNone if successful,KErrArgument if the value is out of range and one of the system wide error codes otherwise.
       
   348 @capability WriteDeviceData
       
   349 @see TLbsAdminSetting
       
   350 @released*/
       
   351 EXPORT_C TInt CLbsAdmin::DoSet(const TLbsAdminSetting& aSetting, const TLbsSystemStartMode& aValue)
       
   352 	{
       
   353 	LBSLOG(ELogP9, "->S CLbsAdmin::Set(TLbsSystemStartMode) LbsAdmin\n");
       
   354 	LBSLOG2(ELogP9, "  > TLbsAdminSetting aSetting  = 0x%016X\n", aSetting);
       
   355 	LBSLOG2(ELogP9, "  > TLbsSystemStartMode aValue  = 0x%02X\n", aValue);
       
   356 	
       
   357 	TInt err = KErrArgument;
       
   358 
       
   359 	if (aSetting == KLbsSettingLbsSystemStartMode)
       
   360 		{
       
   361 		err = iImpl->SetSettingValidated(aSetting, aValue);
       
   362 		}
       
   363 
       
   364 	LBSLOG2(ELogP9, "  Return  = %d\n", err);
       
   365 	return err;
       
   366 	}
       
   367 	
       
   368 /** Sets the KSettingLbsBehaviourMode setting.
       
   369 @param aSetting The setting to be changed.
       
   370 @param aValue   The new value of the setting.
       
   371 @return KErrNone if successful,KErrArgument if the value is out of range and one of the system wide error codes otherwise.
       
   372 @capability WriteDeviceData
       
   373 @see TLbsAdminSetting
       
   374 @released*/
       
   375 EXPORT_C TInt CLbsAdmin::DoSet(const TLbsAdminSetting& aSetting, const TLbsBehaviourMode& aValue)
       
   376 	{
       
   377 	LBSLOG(ELogP1, "CLbsAdmin::DoSet(TLbsAdminSetting, TLbsBehaviourMode)");
       
   378 	if (aSetting == KLbsSettingBehaviourMode)
       
   379 		{
       
   380 		return iImpl->SetSettingValidated(aSetting, aValue);
       
   381 		}
       
   382 	else
       
   383 		{
       
   384 		return KErrArgument;
       
   385 		}
       
   386 	}
       
   387 	
       
   388 	
       
   389 /** Sets the KLbsSettingPrivacyTimeoutAction setting.
       
   390 @param aSetting The setting to be changed.
       
   391 @param aValue   The new value of the setting.
       
   392 @return KErrNone if successful, KErrArgument if the value is out of range and one of the system wide error codes otherwise.
       
   393 @capability WriteDeviceData
       
   394 @see TLbsAdminSetting
       
   395 @released*/
       
   396 EXPORT_C TInt CLbsAdmin::DoSet(const TLbsAdminSetting& aSetting, const TPrivacyTimeoutAction& aValue)
       
   397 	{
       
   398 	LBSLOG(ELogP9, "->S CLbsAdmin::Set(TPrivacyTimeoutAction) LbsAdmin\n");
       
   399 	LBSLOG2(ELogP9, "  > TLbsAdminSetting aSetting  = 0x%016X\n", aSetting);
       
   400 	LBSLOG2(ELogP9, "  > TPrivacyTimeoutAction aValue  = 0x%02X\n", aValue);
       
   401 	
       
   402 	TInt err = KErrArgument;
       
   403 
       
   404 	if (aSetting == KLbsSettingPrivacyTimeoutAction)
       
   405 		{
       
   406 		err = iImpl->SetSettingValidated(aSetting, aValue);
       
   407 		}
       
   408 
       
   409 	LBSLOG2(ELogP9, "  Return  = %d\n", err);
       
   410 	return err;
       
   411 	}
       
   412 	
       
   413 	
       
   414 /** Sets the KLbsSettingPrivacyHandler setting.
       
   415 @param aSetting The setting to be changed.
       
   416 @param aValue   The new value of the setting.
       
   417 @return KErrNone if successful,KErrArgument if the value is out of range and one of the system wide error codes otherwise.
       
   418 @capability WriteDeviceData
       
   419 @see TLbsAdminSetting
       
   420 @released*/
       
   421 EXPORT_C TInt CLbsAdmin::DoSet(const TLbsAdminSetting& aSetting, const TPrivacyHandler& aValue)
       
   422 	{
       
   423 	LBSLOG(ELogP9, "->S CLbsAdmin::Set(TPrivacyHandler) LbsAdmin\n");
       
   424 	LBSLOG2(ELogP9, "  > TLbsAdminSetting aSetting  = 0x%016X\n", aSetting);
       
   425 	LBSLOG2(ELogP9, "  > TPrivacyHandler aValue  = 0x%02X\n", aValue);
       
   426 	
       
   427 	TInt err = KErrArgument;
       
   428 
       
   429 	if (aSetting == KLbsSettingPrivacyHandler)
       
   430 		{
       
   431 		err = iImpl->SetSettingValidated(aSetting, aValue);
       
   432 		}
       
   433 
       
   434 	LBSLOG2(ELogP9, "  Return  = %d\n", err);
       
   435 	return err;
       
   436 	}
       
   437 
       
   438 
       
   439 /** Sets the KLbsSettingLogger setting.
       
   440 @param aSetting The setting to be changed.
       
   441 @param aValue   The new value of the setting.
       
   442 @return KErrNone if successful,KErrArgument if the value is out of range and one of the system wide error codes otherwise.
       
   443 @capability WriteDeviceData
       
   444 @see TLbsAdminSetting
       
   445 @released*/
       
   446 EXPORT_C TInt CLbsAdmin::DoSet(const TLbsAdminSetting& aSetting, const TLogger& aValue)
       
   447 	{
       
   448 	LBSLOG(ELogP1, "CLbsAdmin::DoSet(TLbsAdminSetting, TLogger)");
       
   449 	if (aSetting == KLbsSettingLogger)
       
   450 		{
       
   451 		return iImpl->SetSettingValidated(aSetting, aValue);
       
   452 		}
       
   453 	else
       
   454 		{
       
   455 		return KErrArgument;
       
   456 		}
       
   457 	}
       
   458 	
       
   459 	
       
   460 /** Sets the KLbsSettingClockAdjust or KLbsSettingAllowManualClockAdjust setting.
       
   461 @param aSetting The setting to be changed.
       
   462 @param aValue   The new value of the setting.
       
   463 @return KErrNone if successful,KErrArgument if the value is out of range and one of the system wide error codes otherwise.
       
   464 @capability WriteDeviceData
       
   465 @see TLbsAdminSetting
       
   466 @released*/
       
   467 EXPORT_C TInt CLbsAdmin::DoSet(const TLbsAdminSetting& aSetting, const TClockAdjust& aValue)
       
   468 	{
       
   469 	LBSLOG(ELogP9, "->S CLbsAdmin::Set(TClockAdjust) LbsAdmin\n");
       
   470 	LBSLOG2(ELogP9, "  > TLbsAdminSetting aSetting  = 0x%016X\n", aSetting);
       
   471 	LBSLOG2(ELogP9, "  > TClockAdjust aValue  = 0x%02X\n", aValue);
       
   472 	
       
   473 	TInt err = KErrArgument;
       
   474 
       
   475 	if ((aSetting == KLbsSettingClockAdjust) || (aSetting == KLbsSettingAllowManualClockAdjust))
       
   476 		{
       
   477 		err = iImpl->SetSettingValidated(aSetting, aValue);
       
   478 		}
       
   479 
       
   480 	LBSLOG2(ELogP9, "  Return  = %d\n", err);
       
   481 	return err;
       
   482 	}	
       
   483 	
       
   484 	
       
   485 /** Sets the settings:
       
   486     KLbsSettingClockAdjustThreshold
       
   487     KLbsSettingClockAdjustInterval
       
   488     KLbsSettingMaximumExternalLocateRequests
       
   489     KLbsSettingPrivacyShutdownDelay
       
   490     KLbsSettingPrivacyMaxNetworkSessions
       
   491     KLbsSettingPrivacyConnectionTimeout
       
   492     KLbsSettingPrivacyAppTimeout
       
   493 @param aSetting The setting to be changed.
       
   494 @param aValue   The new value of the setting. The value should be smaller than KMaxTInt.
       
   495 @return KErrNone if successful, one of the system wide error codes otherwise.
       
   496 @capability WriteDeviceData
       
   497 @see TLbsAdminSetting */
       
   498 EXPORT_C TInt CLbsAdmin::DoSet(const TLbsAdminSetting& aSetting, const TUint& aValue)
       
   499 	{
       
   500 	LBSLOG(ELogP9, "->S CLbsAdmin::Set(TUint) LbsAdmin\n");
       
   501 	LBSLOG2(ELogP9, "  > TLbsAdminSetting aSetting  = 0x%016X\n", aSetting);
       
   502 	LBSLOG2(ELogP9, "  > TUint aValue  = %u\n", aValue);
       
   503 	
       
   504 	TInt err = KErrArgument;
       
   505 
       
   506 	if (((aSetting == KLbsSettingClockAdjustThreshold) || 
       
   507 		(aSetting == KLbsSettingClockAdjustInterval) ||
       
   508 		((aSetting == KLbsSettingMaximumExternalLocateRequests) && (aValue>0))|| 
       
   509 		(aSetting == KLbsSettingPrivacyShutdownDelay) ||
       
   510 		(aSetting == KLbsSettingPrivacyMaxNetworkSessions) ||
       
   511 		(aSetting == KLbsSettingPrivacyConnectionTimeout) ||
       
   512 		(aSetting == KLbsSettingPrivacyAppTimeout)) 
       
   513 		&& aValue <= KMaxTInt)
       
   514 		{
       
   515 		err = iImpl->SetSettingValidated(aSetting, aValue);
       
   516 		}
       
   517 
       
   518 	LBSLOG2(ELogP9, "  Return  = %d\n", err);
       
   519 	return err;
       
   520 
       
   521 	}	
       
   522 
       
   523 /** Sets the extended KSettingHomeExternalLocate, KSettingHomeExternalLocate, KSettingHomeProtocolModule,
       
   524 KSettingRoamingProtocolModule and KLbsProtocolModuleLoading settings.
       
   525 The extended settings derive from the TLbsAdminInfoBase class.
       
   526 
       
   527 @param aSetting [In] The setting to be changed.
       
   528 @param aValue   [In] The new value of the setting.
       
   529 @return KErrNone if successful, KErrNotSupported if a setting value is not supported,
       
   530         KErrArgument if the setting values are incorrect or the type of the TLbsAdminInfoBase derived
       
   531         class does not match the setting. One of the system wide error codes otherwise.
       
   532 
       
   533 @capability WriteDeviceData
       
   534 @see TLbsAdminSetting
       
   535 @see TLbsAdminInfoBase
       
   536 @released*/
       
   537 EXPORT_C TInt CLbsAdmin::DoSet(const TLbsAdminSetting& aSetting, const TLbsAdminInfoBase& aInfo)
       
   538 	{
       
   539 	LBSLOG(ELogP9, "->S CLbsAdmin::Set(TLbsAdminInfoBase) LbsAdmin\n");
       
   540 	LBSLOG2(ELogP9, "  > TLbsAdminSetting aSetting   = 0x%016X\n", aSetting);
       
   541 	LBSLOG2(ELogP9, "  > TLbsAdminInfoBase.ClassType = 0x%02X\n", aInfo.ClassType());
       
   542 	
       
   543 	TInt err = KErrArgument;
       
   544 
       
   545 	if (aSetting == KLbsProtocolModuleLoading)
       
   546 		{
       
   547 #ifdef ENABLE_LBS_DEV_LOGGER		
       
   548 		const TLbsAdminProtocolModuleLoadingInfo& info = static_cast<const TLbsAdminProtocolModuleLoadingInfo&>(aInfo);
       
   549 		LBSLOG2(ELogP9, "  > TProtocolModuleLoading info.iLoadingStrategy  = %u\n", info.LoadingStrategy());
       
   550 		(void) info; // avoid a compiler warning
       
   551 #endif		
       
   552 		err = iImpl->SetInfoBaseValidated(aSetting, aInfo);
       
   553 		}
       
   554 	else if((aSetting == KLbsSettingHomeProtocolModule) || (aSetting == KLbsSettingRoamingProtocolModule))
       
   555 		{
       
   556 		err = iImpl->SetInfoBaseValidated(aSetting, aInfo);
       
   557 		}
       
   558 	
       
   559 	LBSLOG2(ELogP9, "  Return  = %d\n", err);
       
   560 	return err;
       
   561 	}	
       
   562 
       
   563 //--------------------------------------------------------------------------------------------------------
       
   564 /** Gets the KLbsSettingHomeSelfLocate or KLbsSettingRoamingSelfLocate settings.
       
   565 @param aSetting The setting to be retrieved.
       
   566 @param aValue   The value of the setting.
       
   567 @return KErrNone if successful, one of the system wide error codes otherwise.
       
   568 @see TLbsAdminSetting
       
   569 @released*/
       
   570 EXPORT_C TInt CLbsAdmin::DoGet(const TLbsAdminSetting& aSetting, TSelfLocateService& aValue) const
       
   571 	{ 
       
   572 	LBSLOG(ELogP9, "->S CLbsAdmin::Get(TSelfLocateService) LbsAdmin\n");
       
   573 	LBSLOG2(ELogP9, "  > TLbsAdminSetting aSetting  = 0x%016X\n", aSetting);
       
   574 	
       
   575 	TInt err = KErrArgument;
       
   576 
       
   577 	if ((aSetting == KLbsSettingHomeSelfLocate) || (aSetting == KLbsSettingRoamingSelfLocate))
       
   578 		{
       
   579 		err = iImpl->GetSettingValidated(aSetting, reinterpret_cast<TInt&>(aValue));
       
   580 		LBSLOG2(ELogP9, "  < TSelfLocateService aValue  = 0x%02X\n", aValue);
       
   581 		}
       
   582 
       
   583 	LBSLOG2(ELogP9, "  Return  = %d\n", err);
       
   584 	return err;
       
   585 	}
       
   586 
       
   587 
       
   588 /** Gets the KLbsSettingHomeExternalLocate, KLbsSettingRoamingExternalLocate,
       
   589     KLbsSettingHomeEmergencyLocate or KLbsSettingRoamingEmergencyLocate settings.
       
   590 @param aSetting The setting to be retrieved.
       
   591 @param aValue   The value of the setting.
       
   592 @return KErrNone if successful, one of the system wide error codes otherwise.
       
   593 @see TLbsAdminSetting
       
   594 @released*/
       
   595 EXPORT_C TInt CLbsAdmin::DoGet(const TLbsAdminSetting& aSetting, TExternalLocateService& aValue) const
       
   596 	{
       
   597 	LBSLOG(ELogP9, "->S CLbsAdmin::Get(TExternalLocateService) LbsAdmin\n");
       
   598 	LBSLOG2(ELogP9, "  > TLbsAdminSetting aSetting  = 0x%016X\n", aSetting);
       
   599 	
       
   600 	TInt err = KErrArgument;
       
   601 
       
   602 	if ((aSetting == KLbsSettingHomeExternalLocate) || (aSetting == KLbsSettingRoamingExternalLocate) ||
       
   603 	    (aSetting == KLbsSettingHomeEmergencyLocate) || (aSetting == KLbsSettingRoamingEmergencyLocate) ||
       
   604 		(aSetting == KLbsSettingHomeNetworkInducedLocate) || (aSetting == KLbsSettingRoamingNetworkInducedLocate))
       
   605 		{
       
   606 		err = iImpl->GetSettingValidated(aSetting, reinterpret_cast<TInt&>(aValue));
       
   607 		LBSLOG2(ELogP9, "  < TExternalLocateService aValue  = 0x%02X\n", aValue);
       
   608 		}
       
   609 
       
   610 	LBSLOG2(ELogP9, "  Return  = %d\n", err);
       
   611 	return err;
       
   612 	}
       
   613 
       
   614 
       
   615 /** Gets the KLbsSettingHomeTransmitLocate or KLbsSettingRoamingTransmitLocate settings.
       
   616 @param aSetting The setting to be retrieved.
       
   617 @param aValue   The value of the setting.
       
   618 @return KErrNone if successful, one of the system wide error codes otherwise.
       
   619 @see TLbsAdminSetting
       
   620 @released*/
       
   621 EXPORT_C TInt CLbsAdmin::DoGet(const TLbsAdminSetting& aSetting, TTransmitLocateService& aValue) const
       
   622 	{
       
   623 	LBSLOG(ELogP9, "->S CLbsAdmin::Get(TTransmitLocateService) LbsAdmin\n");
       
   624 	LBSLOG2(ELogP9, "  > TLbsAdminSetting aSetting  = 0x%016X\n", aSetting);
       
   625 	
       
   626 	TInt err = KErrArgument;
       
   627 
       
   628 	if ((aSetting == KLbsSettingHomeTransmitLocate) || (aSetting == KLbsSettingRoamingTransmitLocate))
       
   629 		{
       
   630 		err = iImpl->GetSettingValidated(aSetting, reinterpret_cast<TInt&>(aValue));
       
   631 		LBSLOG2(ELogP9, "  < TTransmitLocateService aValue  = 0x%02X\n", aValue);
       
   632 		}
       
   633 
       
   634 	LBSLOG2(ELogP9, "  Return  = %d\n", err);
       
   635 	return err;
       
   636 	}		
       
   637 
       
   638 
       
   639 /** Gets the KLbsSettingHomeGpsMode or KLbsSettingRoamingGpsMode settings.
       
   640 @param aSetting The setting to be retrieved.
       
   641 @param aValue   The value of the setting.
       
   642 @return KErrNone if successful, one of the system wide error codes otherwise.
       
   643 @see TLbsAdminSetting
       
   644 @released*/
       
   645 EXPORT_C TInt CLbsAdmin::DoGet(const TLbsAdminSetting& aSetting, TGpsMode& aValue) const
       
   646 	{
       
   647 	LBSLOG(ELogP9, "->S CLbsAdmin::Get(TGpsMode) LbsAdmin");
       
   648 	LBSLOG2(ELogP9, "  > TLbsAdminSetting aSetting  = 0x%016X\n", aSetting);
       
   649 	
       
   650 	TInt err = KErrArgument;
       
   651 
       
   652 	if ((aSetting == KLbsSettingHomeGpsMode) || (aSetting == KLbsSettingRoamingGpsMode))
       
   653 		{
       
   654 		err = iImpl->GetSettingValidated(aSetting, reinterpret_cast<TInt&>(aValue));
       
   655 		LBSLOG2(ELogP9, "  < TGpsMode aValue  = 0x%02X\n", aValue);
       
   656 		}
       
   657 	
       
   658 	LBSLOG2(ELogP9, "  Return  = %d\n", err);
       
   659 	return err;
       
   660 	}
       
   661 
       
   662 
       
   663 /** Gets the KLbsSettingHomeProtocolModule or KLbsSettingRoamingProtocolModule settings
       
   664 or KLbsSettingSetClockModule settings.
       
   665 @param aSetting The setting to be retrieved.
       
   666 @param aValue   The value of the setting.
       
   667 @return KErrNone if successful, one of the system wide error codes otherwise.
       
   668 @see TLbsAdminSetting
       
   669 @released*/
       
   670 EXPORT_C TInt CLbsAdmin::DoGet(const TLbsAdminSetting& aSetting, TUid& aValue) const
       
   671 	{
       
   672 	LBSLOG(ELogP9, "->S CLbsAdmin::Get(TUid) LbsAdmin");
       
   673 	LBSLOG2(ELogP9, "  > TLbsAdminSetting aSetting  = 0x%016X\n", aSetting);
       
   674 	
       
   675 	TInt err = KErrArgument;
       
   676 	
       
   677 	if ((aSetting == KLbsSettingHomeProtocolModule) || (aSetting == KLbsSettingRoamingProtocolModule) ||
       
   678 		(aSetting == KLbsSettingSetClockModule))
       
   679 		{
       
   680 		err = iImpl->GetSettingValidated(aSetting, reinterpret_cast<TInt&>(aValue));
       
   681 		LBSLOG2(ELogP9, "  < TUid aValue  = 0x%08X\n", aValue.iUid);
       
   682 		}
       
   683 
       
   684 	LBSLOG2(ELogP9, "  Return  = %d\n", err);
       
   685 	return err;
       
   686 	}
       
   687 	
       
   688 	
       
   689 /** Gets the KLbsSettingQualityProfileSelfLocate or KLbsSettingQualityProfileExternalLocate 
       
   690     or KLbsSettingQualityProfileTransmitLocate settings.
       
   691 @param aSetting The setting to be retrieved.
       
   692 @param aValue   The value of the setting.
       
   693 @return KErrNone if successful, one of the system wide error codes otherwise.
       
   694 @see TLbsAdminSetting
       
   695 @released*/
       
   696 EXPORT_C TInt CLbsAdmin::DoGet(const TLbsAdminSetting& aSetting, TLbsQualityProfileId& aValue) const
       
   697 	{
       
   698 	LBSLOG(ELogP9, "->S CLbsAdmin::Get(TLbsQualityProfileId) LbsAdmin");
       
   699 	LBSLOG2(ELogP9, "  > TLbsAdminSetting aSetting  = 0x%016X\n", aSetting);
       
   700 	
       
   701 	TInt err = KErrArgument;
       
   702 	
       
   703 	if ((aSetting == KLbsSettingQualityProfileSelfLocate) || (aSetting == KLbsSettingQualityProfileExternalLocate) ||
       
   704 		(aSetting == KLbsSettingQualityProfileTransmitLocate))
       
   705 		{
       
   706 		err = iImpl->GetSettingValidated(aSetting, reinterpret_cast<TInt&>(aValue));
       
   707 		LBSLOG2(ELogP9, "  < TLbsQualityProfileId aValue  = %u\n", aValue);
       
   708 		}
       
   709 
       
   710 	LBSLOG2(ELogP9, "  Return  = %d\n", err);
       
   711 	return err;
       
   712 	}
       
   713 	
       
   714 	
       
   715 /** Gets the KLbsSettingLbsSystemStartMode setting.
       
   716 @param aSetting The setting to be retrieved. 
       
   717 @param aValue   The value of the setting.
       
   718 @return KErrNone if successful, one of the system wide error codes otherwise.
       
   719 @see TLbsAdminSetting
       
   720 @released*/
       
   721 EXPORT_C TInt CLbsAdmin::DoGet(const TLbsAdminSetting& aSetting, TLbsSystemStartMode& aValue) const
       
   722 	{
       
   723 	LBSLOG(ELogP9, "->S CLbsAdmin::Set(TLbsSystemStartMode) LbsAdmin");
       
   724 	LBSLOG2(ELogP9, "  > TLbsAdminSetting aSetting  = 0x%016X\n", aSetting);
       
   725 	
       
   726 	TInt err = KErrArgument;
       
   727 
       
   728 	if (aSetting == KLbsSettingLbsSystemStartMode)
       
   729 		{
       
   730 		err = iImpl->GetSettingValidated(aSetting, reinterpret_cast<TInt&>(aValue));
       
   731 		LBSLOG2(ELogP9, "  < TLbsSystemStartMode aValue  = 0x%02X\n", aValue);
       
   732 		}
       
   733 	
       
   734 	LBSLOG2(ELogP9, "  Return  = %d\n", err);
       
   735 	return err;
       
   736 	}
       
   737 	
       
   738    	
       
   739   /** Gets the KLbsBehaviourMode setting.
       
   740   @param aSetting The setting to be retrieved. 
       
   741   @param aValue   The value of the setting.
       
   742   @return KErrNone if successful, one of the system wide error codes otherwise.
       
   743   @see TLbsAdminSetting
       
   744   @released*/
       
   745   EXPORT_C TInt CLbsAdmin::DoGet(const TLbsAdminSetting& aSetting, TLbsBehaviourMode& aValue) const
       
   746   	{
       
   747   	LBSLOG(ELogP1, "CLbsAdmin::DoGet(TLbsAdminSetting, TLbsBehaviourMode)");
       
   748   	if (aSetting == KLbsSettingBehaviourMode)
       
   749   		{
       
   750   		return iImpl->GetSettingValidated(aSetting, reinterpret_cast<TInt&>(aValue));
       
   751   		}
       
   752   	else
       
   753   		{
       
   754   		return KErrArgument;
       
   755   		}
       
   756   	}
       
   757    	
       
   758 
       
   759 	
       
   760 /** Gets the KLbsSettingPrivacyTimeoutAction setting.
       
   761 @param aSetting The setting to be retrieved.
       
   762 @param aValue   The value of the setting.
       
   763 @return KErrNone if successful, one of the system wide error codes otherwise.
       
   764 @see TLbsAdminSetting
       
   765 @released*/
       
   766 EXPORT_C TInt CLbsAdmin::DoGet(const TLbsAdminSetting& aSetting, TPrivacyTimeoutAction& aValue) const
       
   767 	{
       
   768 	LBSLOG(ELogP9, "->S CLbsAdmin::Get(TPrivacyTimeoutAction) LbsAdmin");
       
   769 	LBSLOG2(ELogP9, "  > TLbsAdminSetting aSetting  = 0x%016X\n", aSetting);
       
   770 	
       
   771 	TInt err = KErrArgument;
       
   772 
       
   773 	if (aSetting == KLbsSettingPrivacyTimeoutAction)
       
   774 		{
       
   775 		err = iImpl->GetSettingValidated(aSetting, reinterpret_cast<TInt&>(aValue));
       
   776 		LBSLOG2(ELogP9, "  < TPrivacyTimeoutAction aValue  = 0x%02X\n", aValue);
       
   777 		}
       
   778 	
       
   779 	LBSLOG2(ELogP9, "  Return  = %d\n", err);
       
   780 	return err;
       
   781 	}		
       
   782 
       
   783 
       
   784 /** Gets the KLbsSettingPrivacyHandler setting.
       
   785 @param aSetting The setting to be retrieved.
       
   786 @param aValue   The value of the setting.
       
   787 @return KErrNone if successful, one of the system wide error codes otherwise.
       
   788 @see TLbsAdminSetting
       
   789 @released*/
       
   790 EXPORT_C TInt CLbsAdmin::DoGet(const TLbsAdminSetting& aSetting, TPrivacyHandler& aValue) const
       
   791 	{
       
   792 	LBSLOG(ELogP9, "->S CLbsAdmin::Get(TPrivacyHandler) LbsAdmin");
       
   793 	LBSLOG2(ELogP9, "  > TLbsAdminSetting aSetting  = 0x%016X\n", aSetting);
       
   794 	
       
   795 	TInt err = KErrArgument;
       
   796 
       
   797 	if (aSetting == KLbsSettingPrivacyHandler)
       
   798 		{
       
   799 		err = iImpl->GetSettingValidated(aSetting, reinterpret_cast<TInt&>(aValue));
       
   800 		LBSLOG2(ELogP9, "  < TPrivacyHandler aValue  = 0x%02X\n", aValue);
       
   801 		}
       
   802 
       
   803 	LBSLOG2(ELogP9, "  Return  = %d\n", err);
       
   804 	return err;
       
   805 	}
       
   806 	
       
   807 /** Gets the KLbsSettingLogger setting.
       
   808 @param aSetting The setting to be retrieved.
       
   809 @param aValue   The value of the setting.
       
   810 @return KErrNone if successful, one of the system wide error codes otherwise.
       
   811 @see TLbsAdminSetting
       
   812 @released*/
       
   813 EXPORT_C TInt CLbsAdmin::DoGet(const TLbsAdminSetting& aSetting, TLogger& aValue) const
       
   814 	{
       
   815 	LBSLOG(ELogP1, "CLbsAdmin::DoGet(TLbsAdminSetting, TLogger)");
       
   816 	if (aSetting == KLbsSettingLogger)
       
   817 		{
       
   818 		return iImpl->GetSettingValidated(aSetting, reinterpret_cast<TInt&>(aValue));
       
   819 		}
       
   820 	else
       
   821 		{
       
   822 		return KErrArgument;
       
   823 		}
       
   824 	}
       
   825 
       
   826 
       
   827 /** Gets the settings: 
       
   828  	KLbsSpecialFeatureAllowTBFinalNetPos
       
   829  	KLbsSpecialFeatureIgnoreAccuracy
       
   830   	KLbsSpecialFeatureWithholdDeliveryOfReferencePositions 
       
   831   	KLbsSpecialFeatureIntermediateFutileUpdate
       
   832 @param aSetting The setting to be retrieved.
       
   833 @param aValue   The value of the setting.
       
   834 @return KErrNone if successful, one of the system wide error codes otherwise.
       
   835 @see TLbsAdminSetting
       
   836 @released*/
       
   837 EXPORT_C TInt CLbsAdmin::DoGet(const TLbsAdminSetting& aSetting, TSpecialFeature& aValue) const
       
   838 	{
       
   839 	LBSLOG(ELogP1, "CLbsAdmin::DoGet(TLbsAdminSetting, TSpecialFeature)");
       
   840 	if ((aSetting == KLbsSpecialFeatureAllowTBFinalNetPos) 
       
   841 		|| (aSetting == KLbsSpecialFeatureIgnoreAccuracy) 
       
   842 		|| (aSetting == KLbsSpecialFeatureWithholdDeliveryOfReferencePositions)
       
   843 		|| (aSetting == KLbsSpecialFeatureIntermediateFutileUpdate))
       
   844 		{
       
   845 		return iImpl->GetSettingValidated(aSetting, reinterpret_cast<TInt&>(aValue));
       
   846 		}
       
   847 	else
       
   848 		{
       
   849 		return KErrArgument;
       
   850 		}
       
   851 	}
       
   852 	
       
   853 	
       
   854 
       
   855 
       
   856 	
       
   857 /** Gets the KLbsSettingClockAdjust or KLbsSettingAllowManualClockAdjust setting.
       
   858 @param aSetting The setting to be retrieved.
       
   859 @param aValue   The value of the setting.
       
   860 @return KErrNone if successful, one of the system wide error codes otherwise.
       
   861 @see TLbsAdminSetting
       
   862 @released*/
       
   863 EXPORT_C TInt CLbsAdmin::DoGet(const TLbsAdminSetting& aSetting, TClockAdjust& aValue) const
       
   864 	{
       
   865 	LBSLOG(ELogP9, "->S CLbsAdmin::Get(TClockAdjust) LbsAdmin");
       
   866 	LBSLOG2(ELogP9, "  > TLbsAdminSetting aSetting  = 0x%016X\n", aSetting);
       
   867 	
       
   868 	TInt err = KErrArgument;
       
   869 	
       
   870 	if ((aSetting == KLbsSettingClockAdjust) || (aSetting == KLbsSettingAllowManualClockAdjust))
       
   871 		{
       
   872 		err = iImpl->GetSettingValidated(aSetting, reinterpret_cast<TInt&>(aValue));
       
   873 		LBSLOG2(ELogP9, "  < TClockAdjust aValue  = 0x%02X\n", aValue);
       
   874 		}
       
   875 
       
   876 	LBSLOG2(ELogP9, "  Return  = %d\n", err);
       
   877 	return err;
       
   878 	}			
       
   879 
       
   880 /** Gets the settings:
       
   881     KLbsSettingClockAdjustThreshold
       
   882     KLbsSettingClockAdjustInterval
       
   883     KLbsSpecialFeatureMaximumRequestDelay
       
   884     KLbsSettingMaximumExternalLocateRequests
       
   885     KLbsSettingPrivacyShutdownDelay
       
   886     KLbsSettingPrivacyMaxNetworkSessions
       
   887     KLbsSettingPrivacyConnectionTimeout
       
   888     KLbsSettingPrivacyAppTimeout
       
   889 @param aSetting The setting to be retrieved.
       
   890 @param aValue   The value of the setting.
       
   891 @return KErrNone if successful, one of the system wide error codes otherwise.
       
   892 @see TLbsAdminSetting */
       
   893 EXPORT_C TInt CLbsAdmin::DoGet(const TLbsAdminSetting& aSetting, TUint& aValue) const
       
   894 	{
       
   895 	LBSLOG(ELogP9, "->S CLbsAdmin::Get(TUint) LbsAdmin");
       
   896 	LBSLOG2(ELogP9, "  > TLbsAdminSetting aSetting  = 0x%016X\n", aSetting);
       
   897 	
       
   898 	TInt err = KErrArgument;
       
   899 
       
   900 	if ((aSetting == KLbsSettingClockAdjustThreshold) || 
       
   901 		(aSetting == KLbsSettingClockAdjustInterval) ||
       
   902 		(aSetting == KLbsSpecialFeatureMaximumRequestDelay) ||
       
   903 		(aSetting == KLbsSettingMaximumExternalLocateRequests) ||
       
   904 		(aSetting == KLbsSettingPrivacyShutdownDelay) ||
       
   905 		(aSetting == KLbsSettingPrivacyMaxNetworkSessions) ||
       
   906 		(aSetting == KLbsSettingPrivacyConnectionTimeout) ||
       
   907 		(aSetting == KLbsSettingPrivacyAppTimeout))
       
   908 		{
       
   909 		err = iImpl->GetSettingValidated(aSetting, reinterpret_cast<TInt&>(aValue));
       
   910 		LBSLOG2(ELogP9, "  < TUint aValue  = %u\n", aValue);
       
   911 		}
       
   912 
       
   913 	LBSLOG2(ELogP9, "  Return  = %d\n", err);
       
   914 	return err;
       
   915 	}	
       
   916 
       
   917 /** Gets the extended KSettingHomeExternalLocate, KSettingRoamingExternalLocate, KSettingHomeProtocolModule,
       
   918 KSettingRoamingProtocolModule and KLbsProtocolModuleLoading settings.
       
   919 The extended settings derive from the TLbsAdminInfoBase class.
       
   920 
       
   921 @param aSetting [In]  The setting to be retrieved.
       
   922 @param aValue   [Out] The value of the setting.
       
   923 @return KErrNone if successful, one of the system wide error codes otherwise.
       
   924 
       
   925 @see TLbsAdminSetting
       
   926 @see TLbsAdminInfoBase
       
   927 @released*/
       
   928 
       
   929 
       
   930 EXPORT_C TInt CLbsAdmin::DoGet(const TLbsAdminSetting& aSetting, TLbsAdminInfoBase& aInfo) const
       
   931 	{
       
   932 	LBSLOG(ELogP9, "->S CLbsAdmin::Get(TLbsAdminInfoBase) LbsAdmin\n");
       
   933 	LBSLOG2(ELogP9, "  > TLbsAdminSetting aSetting   = 0x%016X\n", aSetting);
       
   934 	LBSLOG2(ELogP9, "  > TLbsAdminInfoBase.ClassType = 0x%02X\n", aInfo.ClassType());
       
   935 	
       
   936 	TInt err = KErrArgument;
       
   937 
       
   938 	if (aSetting == KLbsProtocolModuleLoading)
       
   939 		{
       
   940 		err = iImpl->GetSettingValidated(aSetting, reinterpret_cast<TInt&>(aInfo));
       
   941 #ifdef ENABLE_LBS_DEV_LOGGER		
       
   942 		TLbsAdminProtocolModuleLoadingInfo& info = static_cast<TLbsAdminProtocolModuleLoadingInfo&>(aInfo);
       
   943 		LBSLOG2(ELogP9, "  < TProtocolModuleLoading info.iLoadingStrategy  = %u\n", info.LoadingStrategy());
       
   944 		(void) info; // avoid a compiler warning
       
   945 #endif		
       
   946 		}
       
   947 	else if (aSetting == KLbsSettingHomeProtocolModule)
       
   948 		{
       
   949 		err = iImpl->GetSettingValidated(KLbsProtocolModulesHome, reinterpret_cast<TInt&>(aInfo));
       
   950 		}
       
   951 	else if (aSetting == KLbsSettingRoamingProtocolModule)
       
   952 		{
       
   953 		err = iImpl->GetSettingValidated(KLbsProtocolModulesRoaming, reinterpret_cast<TInt&>(aInfo));
       
   954 		}
       
   955 		
       
   956 	LBSLOG2(ELogP9, "  Return  = %d\n", err);
       
   957 	return err;
       
   958 	}	
       
   959 
       
   960 	
       
   961 //********************************************************************************************************
       
   962 // Class MLbsAdminObserver - Public Methods
       
   963 //********************************************************************************************************
       
   964 /** Returns Observer version number
       
   965 @return Version number.
       
   966 @released*/
       
   967 /*virtual*/ EXPORT_C TVersion MLbsAdminObserver::Version() 
       
   968 	{
       
   969 	LBSLOG(ELogP9, "<-S MLbsAdminObserver::Version() LbsAdmin\n");
       
   970 	LBSLOG4(ELogP9, "  Return TVersion  = %d, %d, %d\n", KLbsAdminMajorVersion, KLbsAdminMinorVersion, KLbsAdminBuild);
       
   971 	
       
   972 	return TVersion(KLbsAdminMajorVersion, KLbsAdminMinorVersion, KLbsAdminBuild);
       
   973 	}