diff -r 9674c1a575e9 -r b8fae6b8a148 idlehomescreen/hscontentcontrol/src/hscontentcontroluninstallmonitor.cpp --- a/idlehomescreen/hscontentcontrol/src/hscontentcontroluninstallmonitor.cpp Mon Mar 15 12:39:47 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,104 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Class to listen SWI uninstall operation. -* -*/ - -#include "hscontentcontroluninstallmonitor.h" -#include - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// CHsContentControlUninstallMonitor::NewL() -// --------------------------------------------------------------------------- -// -CHsContentControlUninstallMonitor* CHsContentControlUninstallMonitor::NewL( - MHsContentControlUninstallObserver& aObs ) - { - CHsContentControlUninstallMonitor* self = - new ( ELeave ) CHsContentControlUninstallMonitor( aObs ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - return self; - } - -// --------------------------------------------------------------------------- -// CHsContentControlUninstallMonitor::~CHsContentControlUninstallMonitor() -// --------------------------------------------------------------------------- -// -CHsContentControlUninstallMonitor::~CHsContentControlUninstallMonitor() - { - Cancel(); - iSwUninstallKey.Close(); - } - -// --------------------------------------------------------------------------- -// CHsContentControlUninstallMonitor::DoCancel() -// --------------------------------------------------------------------------- -// -void CHsContentControlUninstallMonitor::DoCancel() - { - if ( IsActive() ) - { - iSwUninstallKey.Cancel(); - } - } - -// --------------------------------------------------------------------------- -// CHsContentControlUninstallMonitor::RunL() -// --------------------------------------------------------------------------- -// -void CHsContentControlUninstallMonitor::RunL() - { - iSwUninstallKey.Subscribe( iStatus ); - SetActive(); - - TInt value = 0; - if( iSwUninstallKey.Get( value ) == KErrNone ) - { - TUid uid( KNullUid ); - uid.iUid = value; - iObs.HandleUninstallEvent( uid ); - } - } - -// --------------------------------------------------------------------------- -// CHsContentControlUninstallMonitor::CHsContentControlUninstallMonitor() -// --------------------------------------------------------------------------- -// -CHsContentControlUninstallMonitor::CHsContentControlUninstallMonitor( - MHsContentControlUninstallObserver& aObs ) - : CActive( CActive::EPriorityStandard ), - iObs( aObs ) - { - CActiveScheduler::Add( this ); - } - -// --------------------------------------------------------------------------- -// CHsContentControlUninstallMonitor::ConstructL() -// --------------------------------------------------------------------------- -// -void CHsContentControlUninstallMonitor::ConstructL() - { - if ( KErrNone == iSwUninstallKey.Attach( - KPSUidSWInstallerUiNotification, KSWInstallerUninstallation ) ) - { - iSwUninstallKey.Subscribe( iStatus ); - SetActive(); - } - } - -// End of file