// ----------------------------------------------------------------------------- // CWidgetRegistrySTIF::ConstructL // Symbian 2nd phase constructor can leave. // Note: If OOM test case uses STIF Logger, then STIF Logger must be created // with static buffer size parameter (aStaticBufferSize). Otherwise Logger // allocates memory from heap and therefore causes error situations with OOM // testing. For more information about STIF Logger construction, see STIF Users // Guide. // ----------------------------------------------------------------------------- // void CWidgetRegistrySTIF::ConstructL() { iLog = CStifLogger::NewL( KWidgetRegistrySTIFLogPath, KWidgetRegistrySTIFLogFile ); User::LeaveIfError( iFileSystem.Connect() ); RWidgetRegistryClientSession* registryClient; registryClient = new (ELeave) RWidgetRegistryClientSession; CleanupStack::PushL( registryClient ); TInt error = registryClient->Connect(); if ( KErrNone == error ) { RWidgetInfoArray widgetInfoArray; error = registryClient->InstalledWidgetsL( widgetInfoArray ); CWidgetInfo *myInfo = widgetInfoArray[0]; iValidUid = myInfo->iUid; } CleanupStack::PopAndDestroy( registryClient ); }