diff -r f742655b05bf -r d38647835c2e commsconfig/cscapplicationui/src/cscdocument.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/commsconfig/cscapplicationui/src/cscdocument.cpp Wed Sep 01 12:29:57 2010 +0100 @@ -0,0 +1,129 @@ +/* +* Copyright (c) 2007-2007 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: CSC Applicationīs Document +* +*/ + +#include +#include +#include +#include + +#include "cscappui.h" +#include "csclogger.h" +#include "cscdocument.h" +#include "cscengservicepluginhandler.h" +#include "cscenguiextensionpluginhandler.h" + + +// ======== MEMBER FUNCTIONS ======== + + +// --------------------------------------------------------------------------- +// --------------------------------------------------------------------------- +// +CCSCDocument::CCSCDocument( CEikApplication& aApp ) : + CAknDocument( aApp ) + { + } + + +// --------------------------------------------------------------------------- +// --------------------------------------------------------------------------- +// +void CCSCDocument::ConstructL() + { + } + + +// --------------------------------------------------------------------------- +// --------------------------------------------------------------------------- +// +void CCSCDocument::UpdateTaskNameL( CApaWindowGroupName* aWgName ) + { + CAknDocument::UpdateTaskNameL( aWgName ); + aWgName->SetHidden( ETrue ); + } + +// --------------------------------------------------------------------------- +// --------------------------------------------------------------------------- +// +CCSCDocument* CCSCDocument::NewL( CEikApplication& aApp ) + { + CCSCDocument* self = NewLC( aApp ); + CleanupStack::Pop( self ); + return self; + } + + +// --------------------------------------------------------------------------- +// --------------------------------------------------------------------------- +// +CCSCDocument* CCSCDocument::NewLC( CEikApplication& aApp ) + { + CCSCDocument* self = new (ELeave) CCSCDocument( aApp ); + CleanupStack::PushL( self ); + self->ConstructL(); + return self; + } + + +// --------------------------------------------------------------------------- +// Transfers ownership to document. +// --------------------------------------------------------------------------- +// +void CCSCDocument::SetOwnershipOfPluginHandlers( + CCSCEngServicePluginHandler* aServicePluginHandler, + CCSCEngUiExtensionPluginHandler* aUiExtensionPluginHandler ) + { + iServicePluginHandler = aServicePluginHandler; + iUiExtensionPluginHandler = aUiExtensionPluginHandler; + } + + +// --------------------------------------------------------------------------- +// Returns reference to service plug-in handler. +// --------------------------------------------------------------------------- +// +CCSCEngServicePluginHandler& CCSCDocument::ServicePluginHandler() + { + return *iServicePluginHandler; + } + +// --------------------------------------------------------------------------- +// From class CAknDocument +// Create the application user interface +// --------------------------------------------------------------------------- +// +CEikAppUi* CCSCDocument::CreateAppUiL() + { + // Create the application user interface, and return a pointer to it + // the framework takes ownership of this object + return ( static_cast( new (ELeave) CCSCAppUi ) ); + } + + +// --------------------------------------------------------------------------- +// --------------------------------------------------------------------------- +// +CCSCDocument::~CCSCDocument() + { + CSCDEBUG( "CCSCDocument::~CCSCDocument - begin" ); + + delete iServicePluginHandler; + delete iUiExtensionPluginHandler; + + CSCDEBUG( "CCSCDocument::~CCSCDocument - end" ); + } +