--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/activityfw/storage/server/src/afapplicationsengine.cpp Fri Aug 06 13:40:46 2010 +0300
@@ -0,0 +1,54 @@
+/*
+* 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:
+*
+*/
+#include "afapplicationsengine.h"
+#include "afapplicationsstorage.h"
+#include "afapplicationscollection.h"
+#include "afapplicationsmonitor.h"
+
+//------------------------------------------------------------------------------
+CAfApplicationsEngine* CAfApplicationsEngine::NewL(RApaLsSession& serviceProvider,
+ CAfStorage& storage)
+{
+ CAfApplicationsEngine *self = new(ELeave)CAfApplicationsEngine();
+ CleanupStack::PushL(self);
+ self->ConstructL(storage, serviceProvider);
+ CleanupStack::Pop(self);
+ return self;
+}
+
+//------------------------------------------------------------------------------
+CAfApplicationsEngine::CAfApplicationsEngine()
+{}
+
+//------------------------------------------------------------------------------
+void CAfApplicationsEngine::ConstructL(CAfStorage& storage,
+ RApaLsSession& serviceProvider)
+{
+ mCollection = CAfApplicationsCollection::NewL(serviceProvider);
+ mMonitor = CAfApplicationsMonitor::NewL(serviceProvider, *mCollection);
+ mStorage = CAfApplicationsStorage::NewL(storage, *mCollection);
+
+ mCollection->setObserver(*mStorage);
+}
+
+//------------------------------------------------------------------------------
+CAfApplicationsEngine::~CAfApplicationsEngine()
+{
+ delete mMonitor;
+ delete mStorage;
+ delete mCollection;
+}