commonuisupport/uikon/srvsrc/eiksrv.cpp
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 // Copyright (c) 1997-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 
       
    17 #include <e32uid.h>
       
    18 #include <e32hal.h>
       
    19 #include <c32comm.h>
       
    20 #include <s32file.h>
       
    21 #include <basched.h>
       
    22 #include <bautils.h>
       
    23 #include <barsread.h>
       
    24 #include <babackup.h>
       
    25 #include <centralrepository.h>
       
    26 #include <apasvst.h>
       
    27 #include <apgcli.h>
       
    28 #include <apgwgnam.h>
       
    29 #include <viewcli.h>
       
    30 #include <vwsappst.h>
       
    31 #include <fepbase.h>
       
    32 #include <eikenv.h>
       
    33 #include <eikdll.h>
       
    34 #include <eikrutil.h>
       
    35 #include <uiklaf/private/lafenv.h>
       
    36 #include <uiklafgt/eikpriv.rsg>
       
    37 #include <uiklaf/private/lafsrv.h>
       
    38 #include <eiksrv.h>
       
    39 #include <eiksrvs.h>
       
    40 #include <eiksvdef.h>
       
    41 #include <eikdebug.h>
       
    42 #include <s32mem.h>
       
    43 #include "EIKSVFTY.H"
       
    44 #include "EIKNFYSV.H"
       
    45 #include "EIKALSRV.H"
       
    46 #include "EIKSRV.PAN"
       
    47 #include "eiksrvsconsts.h"
       
    48 #include "../coresrc/eikdebugprefs.h"
       
    49 #include <graphics/cone/coedefkeys.h>
       
    50 #include "eikdefconst.h"
       
    51 
       
    52 
       
    53 /** Default snooze increment in minutes.
       
    54 @publishedPartner */
       
    55 EXPORT_C extern const TInt KEikAlarmDefaultSnoozeInMinutes = 9;  // must not be initialized in the same CPP file as used, or the compiler will optimize it out
       
    56 
       
    57 const TInt KBufferExpansionGranularity = 0x8;
       
    58 const TUid KUidPasswordMode = {0x1000012B};
       
    59 
       
    60 _LIT(KPanicClient,"EikSrv-client");
       
    61 GLDEF_C void Panic(TEikServPanic aPanic)
       
    62 	{
       
    63 	_LIT(KPanicCat,"EIKON-SERVER");
       
    64 	User::Panic(KPanicCat,aPanic);
       
    65 	}
       
    66 
       
    67 const TUint KRangeCount = 2;
       
    68 const TInt KOpCodeRanges[KRangeCount] =
       
    69 	{
       
    70 	EFirstUnrestrictedOpcodeInEikAppUi,
       
    71 	EEikAppUiFirstUnusedOpcode,
       
    72 	};
       
    73 
       
    74 const TUint8 KElementsIndex[KRangeCount] =
       
    75 	{
       
    76 	CPolicyServer::EAlwaysPass, 	//Always passing no capability required  0-99
       
    77 	CPolicyServer::ENotSupported, 	//Not Supported		EEikAppUiFirstUnusedOpcode-End
       
    78 	};
       
    79 
       
    80 const CPolicyServer::TPolicy KEikServAppUiPolicy =
       
    81 	{
       
    82 	CPolicyServer::EAlwaysPass,
       
    83 	KRangeCount,
       
    84 	KOpCodeRanges,
       
    85 	KElementsIndex,
       
    86 	NULL
       
    87 	};
       
    88 
       
    89 //
       
    90 // class CEikServAppUiServer
       
    91 //
       
    92 
       
    93 EXPORT_C CEikServAppUiServer* CEikServAppUiServer::NewL()
       
    94 	{
       
    95 	CEikServAppUiServer *pS=new CEikServAppUiServer();
       
    96     __ASSERT_ALWAYS(pS!=NULL,PanicServer(EEikSrvSvrCreateServer));
       
    97 	CleanupStack::PushL(pS);
       
    98 	pS->ConstructL();
       
    99 	pS->StartL(EIKAPPUI_SERVER_NAME);
       
   100 	CleanupStack::Pop();
       
   101 	static_cast<CEikServEnv*>(CEikonEnv::Static())->SetEikServer(pS);
       
   102 	return pS;
       
   103 	}
       
   104 
       
   105 const TInt KEiksrvUiDllValue = 0x100053D0;
       
   106 
       
   107 /** Creates an interface object to Eikon server.
       
   108 
       
   109 @publishedPartner
       
   110 @released
       
   111 */
       
   112 typedef CEikAppUi* (*CreateCEikServAppUiBase)();
       
   113 
       
   114 void CEikServAppUiServer::ConstructL()
       
   115 	{
       
   116 	CEikonEnv& eikonEnv=*CEikonEnv::Static();
       
   117 	if (eikonEnv.WsSession().FindWindowGroupIdentifier(0,__EIKON_SERVER_NAME,0)==KErrNotFound)
       
   118 		{
       
   119 		// read the default FEP configuration from resource-file
       
   120 		TResourceReader resourceReader;
       
   121 		eikonEnv.CreateResourceReaderLC(resourceReader, R_EIK_FEP_DEFAULT_DATA);
       
   122 		const TPtrC defaultFep(resourceReader.ReadTPtrC());
       
   123 		const TUint onKeyCharacterCodeForFoldedMatch = resourceReader.ReadUint32();
       
   124 		const TUint onKeyModifierMask = resourceReader.ReadUint32();
       
   125 		const TUint onKeyModifierValues = resourceReader.ReadUint32();
       
   126 		const TUint offKeyCharacterCodeForFoldedMatch = resourceReader.ReadUint32();
       
   127 		const TUint offKeyModifierMask = resourceReader.ReadUint32();
       
   128 		const TUint offKeyModifierValues = resourceReader.ReadUint32();
       
   129 		const TBool onState = resourceReader.ReadUint8();
       
   130 		
       
   131 		// write the "ERepositoryKeyMask_DefaultSetting" settings to the KUidFepFrameworkRepository repository
       
   132 		CRepository* const repository = CRepository::NewLC(TUid::Uid(KUidFepFrameworkRepository));
       
   133 		User::LeaveIfError(repository->StartTransaction(CRepository::EConcurrentReadWriteTransaction));
       
   134 		repository->CleanupCancelTransactionPushL();
       
   135 		CFepGenericGlobalSettings::WriteOnStateAndBroadcastL(*repository, onState, ERepositoryKeyMask_DefaultSetting);
       
   136 		User::LeaveIfError(repository->Set(ERepositoryKey_DefaultFepId, defaultFep));
       
   137 		CFepGenericGlobalSettings::WriteOnOrOffKeyDataAndBroadcastL(*repository, TFepOnOrOffKeyData(onKeyCharacterCodeForFoldedMatch, onKeyModifierMask, onKeyModifierValues), ERepositoryKey_DefaultOnKeyData);
       
   138 		CFepGenericGlobalSettings::WriteOnOrOffKeyDataAndBroadcastL(*repository, TFepOnOrOffKeyData(offKeyCharacterCodeForFoldedMatch, offKeyModifierMask, offKeyModifierValues), ERepositoryKey_DefaultOffKeyData);
       
   139 		CleanupStack::Pop(); // repository->CleanupCancelTransactionPushL
       
   140 		TUint32 notUsed = 0;
       
   141 		User::LeaveIfError(repository->CommitTransaction(notUsed)); // should never leave with KErrLocked as the "ERepositoryKeyMask_DefaultSetting" settings are only ever written to here
       
   142 		CleanupStack::PopAndDestroy(repository);
       
   143 		CleanupStack::PopAndDestroy(); // resourceReader
       
   144 		
       
   145 		// Try to load Fepswitch.exe
       
   146 		RProcess fepswitchProcess;
       
   147 		_LIT(KLitFepswitchExe, "z:\\sys\\bin\\Fepswitch.exe");
       
   148 		const TInt fepSwitchLoadErr = fepswitchProcess.Create(KLitFepswitchExe, KNullDesC, TUidType(TUid::Uid(0x1000007a), TUid::Null(), TUid::Uid(0x10272617)));
       
   149 		if(fepSwitchLoadErr != KErrNotFound)	// Fail silently if optional component fepswitch.exe does not exist
       
   150 			{
       
   151 			User::LeaveIfError(fepSwitchLoadErr);			
       
   152 			CleanupClosePushL(fepswitchProcess);
       
   153 			TRequestStatus requestStatus;
       
   154 			fepswitchProcess.Rendezvous(requestStatus);
       
   155 			fepswitchProcess.Resume();
       
   156 			User::WaitForRequest(requestStatus);
       
   157 			User::LeaveIfError(requestStatus.Int());
       
   158 			CleanupStack::PopAndDestroy(&fepswitchProcess);
       
   159 			}
       
   160 
       
   161 		// load the UI-specific DLL into the Eiksrvs process
       
   162 		TParse parse;
       
   163 		_LIT(KEiksrvUiDllName,"\\sys\\bin\\EiksrvUi.dll");
       
   164 		TFileName myDrive;
       
   165 		Dll::FileName(myDrive); // we want the drive-component, in order to load EiksrvUi.dll from the same drive as we're on
       
   166 		User::LeaveIfError(parse.SetNoWild(KEiksrvUiDllName,&myDrive,NULL));
       
   167 		TUidType uidType(KDynamicLibraryUid,KSharedLibraryUid,TUid::Uid(KEiksrvUiDllValue));
       
   168 		RLibrary lib;
       
   169 		User::LeaveIfError(lib.Load(KEiksrvUiDllName,parse.FullName(),uidType));
       
   170 		CleanupClosePushL(lib);
       
   171 		CreateCEikServAppUiBase appUi = (CreateCEikServAppUiBase)lib.Lookup(1);
       
   172 		CEikAppUi* self = (*appUi)();
       
   173 		User::LeaveIfNull(self);
       
   174 		static_cast<CEikServEnv&>(eikonEnv).SetUiDll(lib);
       
   175 		CleanupStack::Pop(); // lib
       
   176 		self->ConstructL(); // no leaving function may between the creation of "self" and this ConstructL call, as ownership of "this" is transferred to the CCoeEnv at the *start* of CEikServAppUiBase::ConstructL (hence also why "CleanupStack::PushL(self)" is not and should not be done)
       
   177 		
       
   178 		//create CEikDebugPreferences object
       
   179 		iDebugPreferences = CEikDebugPreferences::NewL();
       
   180 		TRAP_IGNORE(iDebugPreferences->RestoreL(eikonEnv.FsSession()));
       
   181 #if defined (_DEBUG) // debug keys are always on, in debug target
       
   182 		iDebugPreferences->SetFlags(iDebugPreferences->Flags()|CEikDebugPreferences::EFlagDebugKeysOn);
       
   183 #endif
       
   184 		}
       
   185 	}
       
   186 	
       
   187 CEikServAppUiServer::~CEikServAppUiServer()
       
   188 	{
       
   189 	delete iDebugPreferences;
       
   190 	}
       
   191 
       
   192 CSession2* CEikServAppUiServer::NewSessionL(const TVersion &aVersion,const RMessage2&) const
       
   193 	{
       
   194 	const TVersion version(1,0,0);
       
   195 	if (!User::QueryVersionSupported(version,aVersion))
       
   196 		User::Leave(KErrNotSupported);
       
   197 
       
   198 	const CEikServEnv* env = static_cast<CEikServEnv*>(CEikonEnv::Static());	
       
   199 	MEikServAppUiSessionFactory* factory = env->EikServAppUiSessionFactory();
       
   200 	return (factory ? factory->CreateSessionL() : NULL);
       
   201 	}
       
   202 
       
   203 CEikServAppUiServer::CEikServAppUiServer (TInt aPriority)
       
   204  	:CPolicyServer(aPriority, KEikServAppUiPolicy)
       
   205 	{}
       
   206 	
       
   207 CEikAppUi& CEikServAppUiServer::AppUi()
       
   208 	{
       
   209 	return *iAppUi;
       
   210 	}
       
   211 
       
   212 //
       
   213 // class CEikServAppUiSession
       
   214 //
       
   215 
       
   216 EXPORT_C CEikServAppUiSession::CEikServAppUiSession(MEikServAppUiSessionHandler* aHandler)
       
   217 	{
       
   218 	iSessionHandler=aHandler;
       
   219 	}
       
   220 
       
   221 EXPORT_C CEikServAppUiSession::~CEikServAppUiSession()
       
   222 	{
       
   223 	if(iScreenBlanked && iAppUiServer && iAppUiServer->iAppUi && iSessionHandler)
       
   224 		iSessionHandler->UnblankScreen();
       
   225 	}
       
   226 	
       
   227 EXPORT_C void CEikServAppUiSession::ConstructL()
       
   228 	{
       
   229 	}
       
   230 
       
   231 void CEikServAppUiSession::PanicClient(const RMessage2& aMessage, TEikAppUiServPanic aCode)
       
   232 	{
       
   233 	aMessage.Panic(KPanicClient, aCode);
       
   234 	}
       
   235 
       
   236 
       
   237 EXPORT_C MEikServAppUiSessionHandler* CEikServAppUiSession::SessionHandler() const
       
   238 	{
       
   239 	return iSessionHandler;
       
   240 	}		
       
   241 
       
   242 EXPORT_C void CEikServAppUiSession::ServiceL(const RMessage2 &aMessage)
       
   243 	{
       
   244 	ASSERT(iSessionHandler);
       
   245 	TBool completeMessage = ETrue;
       
   246 	TInt err = KErrNone;
       
   247 	switch (aMessage.Function())
       
   248 		{
       
   249 	case EEikAppUiCycleTasks:
       
   250 		iSessionHandler->CycleTasksL(TTaskCycleDirection(aMessage.Int0()));
       
   251 		break;
       
   252 	case EEikAppUiSetStatusPaneFlags:
       
   253 		iSessionHandler->SetStatusPaneFlags(aMessage.Int0());
       
   254 		break;
       
   255 	case EEikAppUiSetStatusPaneLayout:
       
   256 		TRAP(err, iSessionHandler->SetStatusPaneLayoutL(aMessage.Int0()));
       
   257 		// Complete with error locally before the break
       
   258 		completeMessage=EFalse;
       
   259 		aMessage.Complete(err);
       
   260 		break;
       
   261 	case EEikAppUiBlankScreen:
       
   262         {
       
   263         TRAP(err, iSessionHandler->BlankScreenL());
       
   264 		if (err == KErrNone)
       
   265 			iScreenBlanked = ETrue;
       
   266         completeMessage = EFalse;
       
   267 		aMessage.Complete(err);
       
   268         }
       
   269 		break;
       
   270 	case EEikAppUiUnblankScreen:
       
   271 		iSessionHandler->UnblankScreen();
       
   272 		iScreenBlanked=EFalse;
       
   273 		break;
       
   274 	case EEikAppUiEnableTaskList:
       
   275 		iSessionHandler->EnableTaskListL();
       
   276 		break;
       
   277 	case EEikAppUiLaunchTaskList:
       
   278 		iSessionHandler->LaunchTaskListL();
       
   279 		break;
       
   280 	case EEikAppUiResolveError:
       
   281 		{
       
   282 		const TInt errCode=aMessage.Int1();
       
   283 		const TUid appUid=TUid::Uid(aMessage.Int2());
       
   284 		TBuf<KEikErrorResolverMaxTextLength> errText;
       
   285 		const CEikonEnv::TErrorValidity errValidity=CEikonEnv::Static()->GetErrorText(errText,errCode,appUid);
       
   286 		if (errValidity==CEikonEnv::EErrorNumValid) 
       
   287 			aMessage.WriteL(0,errText);
       
   288 
       
   289 		aMessage.Complete(errValidity); 
       
   290 		break;
       
   291 		}
       
   292 	case EEikAppUiExtension: 
       
   293 		{
       
   294 		volatile TBool weAreResponsibleForCompletingMessage=ETrue;
       
   295 		TRAPD(error,
       
   296 			const TInt lengthOfRemoteBuffer=User::LeaveIfError(aMessage.GetDesLength(1));
       
   297 			TPtr8 buffer(NULL,0);
       
   298 			if (lengthOfRemoteBuffer>0)
       
   299 				{
       
   300 				buffer.Set(HBufC8::NewLC(lengthOfRemoteBuffer)->Des());
       
   301 				aMessage.ReadL(1, buffer);
       
   302 				}
       
   303 
       
   304 			weAreResponsibleForCompletingMessage=EFalse; // the CEikServAppUiBase-derived class here takes responsibility for completing (or panicking) the message, either in its Extension function or later (asynchronously)	
       
   305 			iSessionHandler->Extension(TUid::Uid(aMessage.Int0()),buffer,aMessage);
       
   306 			if (lengthOfRemoteBuffer>0)
       
   307 				CleanupStack::PopAndDestroy(); // the HBufC8
       
   308 			);
       
   309 
       
   310 		if(!weAreResponsibleForCompletingMessage)
       
   311 			completeMessage = EFalse;
       
   312 		else
       
   313 			{
       
   314 			if (error==KErrBadDescriptor)
       
   315 				aMessage.Panic(__EIKON_SERVER,EEikServPanicNotifyBadDescriptor);
       
   316 			else
       
   317 				aMessage.Complete(error);
       
   318 			}
       
   319 		}
       
   320 		break;
       
   321 	case EEikAppUiGetDebugPreferences:
       
   322 		{
       
   323 		CEikDebugPreferences* debugPreferences = Server().iDebugPreferences;
       
   324 		CBufFlat* const buffer = CBufFlat::NewL(KBufferExpansionGranularity);
       
   325 		CleanupStack::PushL(buffer);
       
   326 		RBufWriteStream writeStream(*buffer);
       
   327 		CleanupClosePushL(writeStream);
       
   328 		writeStream << *debugPreferences;
       
   329 		writeStream.CommitL();
       
   330 		
       
   331 		const TInt initialBufSize = aMessage.Int0();
       
   332 		if (initialBufSize && (buffer->Size() > initialBufSize))
       
   333 			{
       
   334 			// default buffer provided by client is too small, ask client to provide buffer of correct size
       
   335 			User::Leave(buffer->Ptr(0).Size());
       
   336 			}		
       
   337 		aMessage.WriteL(1, buffer->Ptr(0));
       
   338 		CleanupStack::PopAndDestroy(2); //writeStream & buffer
       
   339 		}
       
   340 		break;	
       
   341 	case EEikAppUiResolveErrorWithTitleText:
       
   342 		{
       
   343 		const TInt errCode=aMessage.Int1();
       
   344 
       
   345 		TErrorFlagAndId errInfo;
       
   346 		TPckg<TErrorFlagAndId> errInfoPackage(errInfo);
       
   347 		aMessage.ReadL(2, errInfoPackage);
       
   348 
       
   349 		const TInt lengthOfErrorTextBuffer = aMessage.GetDesMaxLengthL(0);
       
   350 		const TInt lengthOfTitleBuffer = aMessage.GetDesMaxLengthL(3);
       
   351 		
       
   352 		RBuf errText;
       
   353 		errText.CreateL(lengthOfErrorTextBuffer);
       
   354 		CleanupClosePushL(errText);
       
   355 
       
   356 		RBuf errorTitleText;
       
   357 		errorTitleText.CreateL(lengthOfTitleBuffer);
       
   358 		CleanupClosePushL(errorTitleText);
       
   359 
       
   360 		const CEikonEnv::TErrorValidity errValidity = CEikonEnv::Static()->DoGetErrorTextAndTitle(errText, errCode, errInfo.iTextId, errInfo.iFlags, errorTitleText, errInfo.iIsMemoryAllocatedByErrResolver);
       
   361 		if (errValidity == CEikonEnv::EErrorNumValid) 
       
   362 			{
       
   363 			aMessage.WriteL(0, errText);
       
   364 			aMessage.WriteL(3, errorTitleText);
       
   365 			}
       
   366 
       
   367 		CleanupStack::PopAndDestroy(2, &errText);
       
   368 		aMessage.WriteL(2, TPckg<TErrorFlagAndId>(errInfo));
       
   369 		aMessage.Complete(errValidity); 
       
   370 		break;
       
   371 		}
       
   372 
       
   373 	default:
       
   374 		aMessage.Complete(KErrNotSupported);
       
   375 		break;
       
   376 		}
       
   377 		
       
   378 	if (completeMessage && !aMessage.IsNull())
       
   379 		aMessage.Complete(KErrNone);
       
   380 	}
       
   381 
       
   382 
       
   383 EXPORT_C void CEikServAppUiSession::ServiceError(const RMessage2& aMessage,TInt aError)
       
   384 	{
       
   385 	if (!aMessage.IsNull())
       
   386 		{
       
   387 		switch(aError)
       
   388 			{
       
   389 		case KErrBadDescriptor:
       
   390 			PanicClient(aMessage, EEikSrvBadDescriptor);
       
   391 			break;
       
   392 		default:
       
   393 			aMessage.Complete(aError);
       
   394 			break;
       
   395 			}
       
   396 		}
       
   397 	}
       
   398 		
       
   399 	
       
   400 // Panic the server
       
   401 GLDEF_C void PanicServer(TEikAppUiServPanic aPanic)
       
   402 	{
       
   403 	_LIT(KPanicCat,"EikAppUiServer");
       
   404 	User::Panic(KPanicCat,aPanic);
       
   405 	}
       
   406 
       
   407 //
       
   408 // CEikPasswordModeCategory
       
   409 //
       
   410 
       
   411 /**  Constructs a new password mode category object. 
       
   412 
       
   413 The system's ini file (c:\\system\\system.ini) is opened, or created if it does not 
       
   414 already exist. 
       
   415 
       
   416 @param aFs A file server session.
       
   417 @return The new password mode category object, or NULL if the disk is full. */
       
   418 EXPORT_C CEikPasswordModeCategory* CEikPasswordModeCategory::NewLC(RFs& aFs)
       
   419 	{ // static
       
   420 	CEikPasswordModeCategory* self=new(ELeave) CEikPasswordModeCategory();
       
   421 	CleanupStack::PushL(self);
       
   422 	TRAPD(err, self->ConstructL(aFs));
       
   423 	if( err == KErrDiskFull )
       
   424 		{
       
   425 		CleanupStack::PopAndDestroy( self );
       
   426 		return NULL;
       
   427 		}
       
   428 	else if( err != KErrNone )
       
   429 		User::Leave( err );
       
   430 	
       
   431 	return self;
       
   432 	}
       
   433 
       
   434 /**  Destructor. Deletes the file store used to read and write the password mode. */
       
   435 EXPORT_C CEikPasswordModeCategory::~CEikPasswordModeCategory()
       
   436 	{
       
   437 	delete iStore;
       
   438 	}
       
   439 
       
   440 /** Reads the password mode entry from the system.ini file, if it contains such an entry, 
       
   441 and returns it in aMode.
       
   442 
       
   443 @param aMode On return, the system's password mode.*/
       
   444 EXPORT_C void CEikPasswordModeCategory::GetPasswordModeL(TPasswordMode& aMode) const
       
   445 	{
       
   446 	if(iStore && iStore->IsPresentL(KUidPasswordMode))
       
   447 		{
       
   448 		RDictionaryReadStream stream;
       
   449 		stream.OpenLC(*iStore,KUidPasswordMode);
       
   450 		aMode = static_cast<TPasswordMode>(stream.ReadInt32L());
       
   451 		CleanupStack::PopAndDestroy(); // stream
       
   452 		}
       
   453 	}
       
   454 
       
   455 /**  Sets the system's password mode by writing the value specified in aMode 
       
   456 to the system.ini file. 
       
   457 
       
   458 @param aMode The new value for the system's password mode. */
       
   459 EXPORT_C void CEikPasswordModeCategory::SetPasswordModeL(TPasswordMode aMode)
       
   460 	{
       
   461 	if(iStore)
       
   462 		{
       
   463 		RDictionaryWriteStream stream;
       
   464 		stream.AssignLC(*iStore,KUidPasswordMode);
       
   465 		stream.WriteInt32L(aMode);
       
   466 		stream.CommitL();
       
   467 		CleanupStack::PopAndDestroy(); // stream
       
   468 		iStore->CommitL();
       
   469 		}
       
   470 	}
       
   471 
       
   472 CEikPasswordModeCategory::CEikPasswordModeCategory()
       
   473 	{}
       
   474 
       
   475 void CEikPasswordModeCategory::ConstructL(RFs& aFs)
       
   476 	{
       
   477 	iStore=CDictionaryFileStore::SystemL(aFs);
       
   478 	}
       
   479 
       
   480 //
       
   481 // class CEikServEnv
       
   482 //
       
   483 
       
   484 EXPORT_C CEikServEnv::CEikServEnv()
       
   485 	{
       
   486 	iIsTaskListEnabled = !(LafEnv::IsTaskListDisabledAtInitialization());
       
   487 	}
       
   488 
       
   489 EXPORT_C CEikServEnv::~CEikServEnv()
       
   490 	{
       
   491 	iUiDll.Close();
       
   492 	}
       
   493 
       
   494 EXPORT_C void CEikServEnv::DestroyEnvironment()
       
   495 	{
       
   496 	delete iServer;
       
   497 	iServer = NULL;
       
   498 	CEikonEnv::DestroyEnvironment();
       
   499 	}
       
   500 
       
   501 void CEikServEnv::SetEikServer(CEikServAppUiServer* aServer)
       
   502 	{
       
   503 	iServer = aServer;
       
   504 	}
       
   505 
       
   506 EXPORT_C void CEikServEnv::SetUiDll(RLibrary& aDll)
       
   507 	{
       
   508 	iUiDll = aDll;
       
   509 	}
       
   510 
       
   511 /**  Sets the Eikon Server Session Factory. This must be called by the System GUI during startup.
       
   512 
       
   513 @param aSessionFactory a pointer to an object of an MEikServSessionFactory derived class. */
       
   514 EXPORT_C void CEikServEnv::SetEikServAppUiSessionFactory(MEikServAppUiSessionFactory* aSessionFactory)
       
   515 	{
       
   516 	ASSERT(iSessionFactory == NULL);
       
   517 	iSessionFactory = aSessionFactory;
       
   518 	}
       
   519 	
       
   520 /**  Returns the EikServ Session Factory.
       
   521 
       
   522 @return the EikServ Session Factory. */
       
   523 EXPORT_C MEikServAppUiSessionFactory* CEikServEnv::EikServAppUiSessionFactory() const
       
   524 	{
       
   525 	return iSessionFactory;
       
   526 	}
       
   527 
       
   528 /**  Returns the status of the task list.
       
   529 
       
   530 @return ETrue if the task list is enabled, EFalse if it is not. */
       
   531 EXPORT_C TBool CEikServEnv::IsTaskListEnabled() const
       
   532 	{
       
   533 	return iIsTaskListEnabled;
       
   534 	}
       
   535 
       
   536 /**  Enables the task list.
       
   537 */
       
   538 EXPORT_C void CEikServEnv::EnableTaskList()
       
   539 	{
       
   540 	iIsTaskListEnabled = ETrue;
       
   541 	}
       
   542 
       
   543 
       
   544 //
       
   545 // MEikNotifyAlertCompletionObserver
       
   546 // 
       
   547 
       
   548 /** Constructor for MEikNotifyAlertCompletionObserver */
       
   549 EXPORT_C MEikNotifyAlertCompletionObserver::MEikNotifyAlertCompletionObserver()
       
   550 	{
       
   551 	}
       
   552 
       
   553 /** Reserved for future use */
       
   554 EXPORT_C void MEikNotifyAlertCompletionObserver::MEikNotifyAlertCompletionObserver_Reserved1()
       
   555 	{
       
   556 	}
       
   557 	
       
   558 /** Reserved for future use */
       
   559 EXPORT_C void MEikNotifyAlertCompletionObserver::MEikNotifyAlertCompletionObserver_Reserved2()
       
   560 	{
       
   561 	}
       
   562 
       
   563 /** Reserved for future use */
       
   564 EXPORT_C void CEikServEnv::CEikServEnv_Reserved1()
       
   565 	{
       
   566 	}
       
   567 	
       
   568 /** Reserved for future use */
       
   569 EXPORT_C void CEikServEnv::CEikServEnv_Reserved2()
       
   570 	{
       
   571 	}
       
   572 		
       
   573 /** Reserved for future use */
       
   574 EXPORT_C void CEikServEnv::CEikServEnv_Reserved3()
       
   575 	{
       
   576 	}
       
   577 /** Reserved for future use */
       
   578 EXPORT_C void CEikServEnv::CEikServEnv_Reserved4()
       
   579 	{
       
   580 	}
       
   581 	
       
   582 /** Reserved for future use */
       
   583 EXPORT_C void CEikServEnv::CEikServEnv_Reserved5()
       
   584 	{
       
   585 	}
       
   586 	
       
   587 /** Reserved for future use */
       
   588 EXPORT_C void CEikServEnv::CEikServEnv_Reserved6()
       
   589 	{
       
   590 	}
       
   591 
       
   592 // from CCoeEnv
       
   593 /** Reserved for future use */
       
   594 EXPORT_C void CEikServEnv::Reserved_1()
       
   595 	{
       
   596 	}
       
   597 	
       
   598 /** Reserved for future use */
       
   599 EXPORT_C void CEikServEnv::Reserved_2()
       
   600 	{
       
   601 	}
       
   602 
       
   603 		
       
   604 //
       
   605 // MEikServAppUiSessionHandler
       
   606 //
       
   607 
       
   608 EXPORT_C MEikServAppUiSessionHandler::MEikServAppUiSessionHandler()
       
   609 	{
       
   610 	}
       
   611 	
       
   612 /** Reserved for future use */
       
   613 EXPORT_C void MEikServAppUiSessionHandler::MEikServAppUiSessionHandler_Reserved1()
       
   614 	{
       
   615 	}
       
   616 /** Reserved for future use */
       
   617 EXPORT_C void MEikServAppUiSessionHandler::MEikServAppUiSessionHandler_Reserved2()
       
   618 	{
       
   619 	}
       
   620 
       
   621 
       
   622 //
       
   623 // MEikServAppUiSessionFactory
       
   624 //
       
   625 
       
   626 EXPORT_C MEikServAppUiSessionFactory::MEikServAppUiSessionFactory()
       
   627 	{
       
   628 	}
       
   629 
       
   630 /** Reserved for future use */
       
   631 EXPORT_C void MEikServAppUiSessionFactory::MEikServAppUiSessionFactory_Reserved1()
       
   632 	{
       
   633 	}
       
   634 
       
   635 /** Reserved for future use */
       
   636 EXPORT_C void MEikServAppUiSessionFactory::MEikServAppUiSessionFactory_Reserved2()
       
   637 	{
       
   638 	}
       
   639 
       
   640 
       
   641 //
       
   642 // MEikServNotifyAlert
       
   643 // 
       
   644 
       
   645 /** Constructor for MEikServNotifyAlert */
       
   646 EXPORT_C MEikServNotifyAlert::MEikServNotifyAlert()
       
   647 	{
       
   648 	}
       
   649 
       
   650 /** Reserved for future use */
       
   651 EXPORT_C void MEikServNotifyAlert::MEikServNotifyAlert_Reserved1()
       
   652 	{
       
   653 	}
       
   654 	
       
   655 /** Reserved for future use */
       
   656 EXPORT_C void MEikServNotifyAlert::MEikServNotifyAlert_Reserved2()
       
   657 	{
       
   658 	}
       
   659 
       
   660 //
       
   661 // MEikServAlarm
       
   662 // 
       
   663 
       
   664 /** Constructor for MEikServAlarm */
       
   665 EXPORT_C MEikServAlarm::MEikServAlarm()
       
   666 	{
       
   667 	}
       
   668 
       
   669 /** Reserved for future use */
       
   670 EXPORT_C void MEikServAlarm::MEikServAlarm_Reserved1()
       
   671 	{
       
   672 	}
       
   673 	
       
   674 /** Reserved for future use */
       
   675 EXPORT_C void MEikServAlarm::MEikServAlarm_Reserved2()
       
   676 	{
       
   677 	}
       
   678 
       
   679 //
       
   680 // MEikServAlarmFactory
       
   681 // 
       
   682 
       
   683 /** Constructor for MEikServAlarmFactory */
       
   684 EXPORT_C MEikServAlarmFactory::MEikServAlarmFactory()
       
   685 	{
       
   686 	}
       
   687 
       
   688 /** Reserved for future use */
       
   689 EXPORT_C void MEikServAlarmFactory::MEikServAlarmFactory_Reserved1()
       
   690 	{
       
   691 	}
       
   692 	
       
   693 /** Reserved for future use */
       
   694 EXPORT_C void MEikServAlarmFactory::MEikServAlarmFactory_Reserved2()
       
   695 	{
       
   696 	}