First public contribution.
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Entry point to debug security server, sets up server/session
25 #include <e32base_private.h>
26 #include <rm_debug_api.h>
28 #include "c_security_svr_server.h"
29 #include "c_security_svr_session.h"
30 #include "rm_debug_logging.h"
32 using namespace Debug;
35 Perform all server initialisation, in particular creation of the
36 scheduler and server and then run the scheduler
40 LOG_MSG( "rm_debug_svr.cpp::RunServerL() : -> new(ELeave) CActiveScheduler\n" );
41 CActiveScheduler* s=new(ELeave) CActiveScheduler;
43 LOG_MSG( "rm_debug_svr.cpp::RunServerL() : -> CleanupStack::PushL(s)\n" );
44 CleanupStack::PushL(s);
46 LOG_MSG( "rm_debug_svr.cpp::RunServerL() : -> CActiveScheduler::Install()\n" );
47 CActiveScheduler::Install(s);
49 LOG_MSG( "rm_debug_svr.cpp::RunServerL() : -> CSecuritySvrServer::NewLC()\n" );
50 CSecuritySvrServer::NewLC();
52 LOG_MSG( "rm_debug_svr.cpp::RunServerL() : -> Rendezvous(KErrNone)\n" );
53 // Signal whoever has started us that we have done so.
54 RProcess::Rendezvous(KErrNone);
55 LOG_MSG( "rm_debug_svr.cpp::RunServerL() : <- Rendezvous()\n" );
57 LOG_MSG( "rm_debug_svr.cpp::RunServerL() : -> CActiveScheduler::Start()\n" );
58 CActiveScheduler::Start();
59 LOG_MSG( "rm_debug_svr.cpp::RunServerL() <- CActiveScheduler::Start()\n" );
61 LOG_MSG( "rm_debug_svr.cpp::RunServerL() : -> CleanupStack::PopAndDestroy()\n" );
62 CleanupStack::PopAndDestroy(2, s);
63 LOG_MSG( "rm_debug_svr.cpp::RunServerL() : <- CleanupStack::PopAndDestroy()\n" );
67 Entry point for debug security server
69 GLDEF_C TInt E32Main()
72 CTrapCleanup* cleanup=CTrapCleanup::New();
73 TInt r = KErrNoMemory;