diff -r 000000000000 -r dd21522fd290 browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadMgrUiBase.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadMgrUiBase.cpp Mon Mar 30 12:54:55 2009 +0300 @@ -0,0 +1,101 @@ +/* +* Copyright (c) 2002-2004 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: Supports common base functionality for DMgr user interfaces +* +*/ + + + +// INCLUDE FILES +#include "CDownloadMgrUiBase.h" +#include "UiLibLogger.h" +#include +#include +#include +#include +#include + +// CONSTANTS +/// DLL rsource file name with path +_LIT( KUiLibResourceFileName, "\\resource\\DownloadMgrUiLib.rsc" ); + +// ============================ MEMBER FUNCTIONS =============================== + +// ----------------------------------------------------------------------------- +// CDownloadMgrUiBase::CDownloadMgrUiBase +// ----------------------------------------------------------------------------- +// +CDownloadMgrUiBase::CDownloadMgrUiBase( CDownloadMgrUiLibRegistry& aRegistryModel ) +: iCoeEnv( *CCoeEnv::Static() ), + iRegistryModel( aRegistryModel ), + iResourceFileName( KNullDesC ), + iResourceLoader( iCoeEnv ), + iResourceOpened( EFalse ), + iExtension( 0 ) + { + } + +// ----------------------------------------------------------------------------- +// CDownloadMgrUiBase::BaseConstructL +// ----------------------------------------------------------------------------- +// +void CDownloadMgrUiBase::BaseConstructL() + { + TParse* fileParser = new (ELeave) TParse; + CleanupStack::PushL( fileParser ); + + Dll::FileName (iResourceFileName); + + fileParser->Set(KUiLibResourceFileName, &iResourceFileName, NULL); + iResourceFileName = fileParser->FullName(); + iResourceLoader.OpenL( iResourceFileName ); + iResourceOpened = ETrue; + + CleanupStack::PopAndDestroy( fileParser ); // fileParser + } + +// Destructor +CDownloadMgrUiBase::~CDownloadMgrUiBase() + { + if ( iResourceOpened ) + { + iResourceLoader.Close(); + iResourceOpened = EFalse; + } + //iExtension is not used yet. + //delete iExtension; + iExtension = NULL; + } + +// ----------------------------------------------------------------------------- +// CDownloadMgrUiBase::ResourceFileName +// ----------------------------------------------------------------------------- +// +TPtrC CDownloadMgrUiBase::ResourceFileName() const + { + return (iResourceFileName); + } + +// ----------------------------------------------------------------------------- +// CDownloadMgrUiBase::SetServerAppExitObserver +// ----------------------------------------------------------------------------- +// +EXPORT_C +void CDownloadMgrUiBase::SetServerAppExitObserver( MAknServerAppExitObserver* aObserver ) + { + CLOG_WRITE_FORMAT("aObserver: 0x%x",aObserver); + iServerAppExitObserver = aObserver; + } + +// End of file.