48
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: Security dialog notifier server
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#include "securitydialognotifierserver.h" // CSecurityDialogNotifierServer
|
|
19 |
#include "securitydialognotifierservername.h" // KSecurityDialogNotifierServerName
|
|
20 |
#include "securitydialogstrace.h" // TRACE macro
|
|
21 |
|
|
22 |
|
|
23 |
// ---------------------------------------------------------------------------
|
|
24 |
// MainL()
|
|
25 |
// ---------------------------------------------------------------------------
|
|
26 |
//
|
|
27 |
LOCAL_C void MainL()
|
|
28 |
{
|
|
29 |
TRACE( "SecurityDialogNotifierServer: MainL" );
|
|
30 |
CActiveScheduler* scheduler = new( ELeave ) CActiveScheduler;
|
|
31 |
CleanupStack::PushL( scheduler );
|
|
32 |
CActiveScheduler::Install( scheduler );
|
|
33 |
|
|
34 |
CSecurityDialogNotifierServer* server = CSecurityDialogNotifierServer::NewLC();
|
|
35 |
User::LeaveIfError( User::RenameThread( KSecurityDialogNotifierServerName ) );
|
|
36 |
TRACE( "SecurityDialogNotifierServer: MainL, rendezvous" );
|
|
37 |
|
|
38 |
RProcess::Rendezvous( KErrNone );
|
|
39 |
TRACE( "SecurityDialogNotifierServer: MainL, activescheduler start" );
|
|
40 |
CActiveScheduler::Start();
|
|
41 |
|
|
42 |
TRACE( "SecurityDialogNotifierServer: MainL, cleanup" );
|
|
43 |
CleanupStack::PopAndDestroy( server );
|
|
44 |
CleanupStack::PopAndDestroy( scheduler );
|
|
45 |
}
|
|
46 |
|
|
47 |
// ---------------------------------------------------------------------------
|
|
48 |
// E32Main()
|
|
49 |
// ---------------------------------------------------------------------------
|
|
50 |
//
|
|
51 |
GLDEF_C TInt E32Main()
|
|
52 |
{
|
|
53 |
CTrapCleanup* cleanup = CTrapCleanup::New();
|
|
54 |
|
|
55 |
TRAPD( err, MainL() );
|
|
56 |
__ASSERT_ALWAYS( !err, User::Panic( KSecurityDialogNotifierServerName, err ) );
|
|
57 |
|
|
58 |
delete cleanup;
|
|
59 |
return err;
|
|
60 |
}
|
|
61 |
|