64
|
1 |
/*
|
|
2 |
* Copyright (c) 2006 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: Application definition.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#include <alf/alfappui.h>
|
|
19 |
#include "alfuids.h"
|
|
20 |
|
|
21 |
_LIT(KAlfServerName, "alfredserver");
|
|
22 |
|
|
23 |
|
|
24 |
static void RunServerL()
|
|
25 |
{
|
|
26 |
CActiveScheduler* s=new(ELeave) CActiveScheduler;
|
|
27 |
CleanupStack::PushL(s);
|
|
28 |
CActiveScheduler::Install(s);
|
|
29 |
|
|
30 |
CAlfAppUi* appUiStub = new (ELeave) CAlfAppUi();
|
|
31 |
CleanupStack::PushL(appUiStub);
|
|
32 |
appUiStub->ConstructL();
|
|
33 |
|
|
34 |
RProcess::Rendezvous(KErrNone);
|
|
35 |
|
|
36 |
CActiveScheduler::Start();
|
|
37 |
|
|
38 |
CleanupStack::PopAndDestroy(2);
|
|
39 |
}
|
|
40 |
|
|
41 |
|
|
42 |
TInt E32Main()
|
|
43 |
{
|
|
44 |
TInt err = User::RenameThread(KAlfServerName);
|
|
45 |
if ( err != KErrNone )
|
|
46 |
{
|
|
47 |
return err;
|
|
48 |
}
|
|
49 |
|
|
50 |
// create CCleanup
|
|
51 |
CTrapCleanup * cleanup = CTrapCleanup::New();
|
|
52 |
if (cleanup)
|
|
53 |
{
|
|
54 |
TRAP(err, RunServerL());
|
|
55 |
delete cleanup;
|
|
56 |
}
|
|
57 |
|
|
58 |
return err;
|
|
59 |
}
|
|
60 |
|