localisation/apparchitecture/apserv/APSSTART.CPP
branchSymbian3
changeset 57 b8d18c84f71c
parent 6 c108117318cb
--- a/localisation/apparchitecture/apserv/APSSTART.CPP	Wed Jul 28 16:03:37 2010 +0100
+++ b/localisation/apparchitecture/apserv/APSSTART.CPP	Tue Aug 03 10:20:34 2010 +0100
@@ -1,7 +1,7 @@
 // Copyright (c) 2004-2009 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"
+// 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".
 //
@@ -13,9 +13,15 @@
 // Description:
 // The main startup of the AppArc server
 // 
+// apsstart.cpp
 //
-
-#include <apsserv.h>
+#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
+#if !defined(__APA_INTERNAL_H__)
+#include "apainternal.h"
+#endif
+#include "apaidpartner.h"
+#endif //SYMBIAN_ENABLE_SPLIT_HEADERS
+#include "apsserv.h"
 #include <fbs.h>
 
 #include "APASVST.H"
@@ -52,46 +58,34 @@
 	RFbsSession::Disconnect();
 	}
 
-static void RunServerL(MApaAppStarter* aAppStarter)
+static void RunServerL()
 //
 // Perform all server initialisation, in particular creation of the
 // scheduler and server and then run the scheduler
 //
 	{
-	MApaAppStarter* appStarter = aAppStarter;
 	// create and install the active scheduler we need
 	CSvActiveScheduler::NewLC();
+
 	// create a RFbsSession
 	User::LeaveIfError(RFbsSession::Connect());
 	CleanupStack::PushL(TCleanupItem(CleanupRFbsSession, NULL));
-	//
+
 	// create the server (leave it on the cleanup stack)
-	CApaAppListServer* appListServer = CApaAppListServer::NewL(appStarter);
-	CleanupStack::PushL(appListServer);
-	//
+	CApaAppArcServer* appArcServer = CApaAppArcServer::NewL();
+	CleanupStack::PushL(appArcServer);
+
 	// Initialisation complete, now signal the client
-#ifdef APA_SERVER_IN_THREAD
-	RThread::Rendezvous(KErrNone);
-#else
-	if(aAppStarter)
-		{
-		// Launching in a thread within an existing process.
-		RThread::Rendezvous(KErrNone);
-		}
-	else
-		{
-		RProcess::Rendezvous(KErrNone);
-		}
-#endif
-	//
+	RProcess::Rendezvous(KErrNone);
+
 	// Ready to run
 	CActiveScheduler::Start();
-	//
+
 	// Cleanup the server, RFbsSession and scheduler
 	CleanupStack::PopAndDestroy(3);
 	}
 
-static TInt RunServer(MApaAppStarter* aAppStarter)
+static TInt RunServer()
 //
 // Main entry-point for the server thread
 //
@@ -107,7 +101,7 @@
 		r=KErrNoMemory;
 		if (cleanup)
 			{
-			TRAP(r,RunServerL(aAppStarter));
+			TRAP(r,RunServerL());
 			REComSession::FinalClose();
 			delete cleanup;
 			}
@@ -121,12 +115,12 @@
 ApaServThreadStart
 
 @internalTechnology
+@released
 */
-EXPORT_C TInt ApaServThreadStart(TAny* aAppStarter)
+EXPORT_C TInt ApaServThreadStart(TAny* /*aUnused*/)
 //
 // thread entry-point function.
 //
 	{
-	MApaAppStarter* appStarter = reinterpret_cast<MApaAppStarter*>(aAppStarter);
-	return RunServer(appStarter);
+	return RunServer();
 	}