diff -r 000000000000 -r dd21522fd290 widgets/widgetstartup/src/WidgetStartup.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/widgets/widgetstartup/src/WidgetStartup.cpp Mon Mar 30 12:54:55 2009 +0300 @@ -0,0 +1,78 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "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: Launches startup widget applications +* +*/ + +#include // For CApaCommandLine +#include // For RApaLsSession +#include "WidgetStartup.h" + +// CONSTANTS +_LIT(KPreInstallerExe,"WidgetPreInstaller.exe"); + +// ============================================================================ +// CWidgetStartup::ConstructL() +// Constructs and start installs +// +// @since 3.1 +// ============================================================================ +// +void CWidgetStartup::ConstructL() + { + BaseConstructL( ENonStandardResourceFile | ENoScreenFurniture ); + + DoPreInstallL(); + + Exit(); + } + +// ============================================================================ +// CWidgetStartup::CWidgetStartup() +// C++ constructor +// +// @since 3.1 +// ============================================================================ +// +CWidgetStartup::CWidgetStartup() + { + } + + +// ----------------------------------------------------------------------------- +// CWidgetStartup::~CWidgetStartup +// C++ destructor +// +// ----------------------------------------------------------------------------- +// +CWidgetStartup::~CWidgetStartup() + { + } + +// --------------------------------------------------------------------------- +// Execute startup functionality. +// --------------------------------------------------------------------------- +// +void CWidgetStartup::DoPreInstallL() + { + RApaLsSession appArcSession; + CleanupClosePushL(appArcSession); + CApaCommandLine* cmdLine=CApaCommandLine::NewLC(); + cmdLine->SetCommandL(EApaCommandBackground); + cmdLine->SetExecutableNameL( KPreInstallerExe ); + + appArcSession.StartApp( *cmdLine ); + CleanupStack::PopAndDestroy(2); // cmdLine, appArcSession + } +// End of File