equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
19 |
19 |
20 |
20 |
21 // INCLUDE FILES |
21 // INCLUDE FILES |
22 #include "StartupApplication.h" |
22 #include "StartupApplication.h" |
23 #include "StartupDocument.h" |
23 #include "StartupDocument.h" |
|
24 #include "startupappprivatepskeys.h" |
|
25 #include <e32property.h> |
|
26 |
|
27 //Security policies |
|
28 _LIT_SECURITY_POLICY_C1(KReadDeviceDataPolicy, ECapabilityReadDeviceData); |
|
29 _LIT_SECURITY_POLICY_C1(KWriteDeviceDataPolicy, ECapabilityWriteDeviceData); |
24 |
30 |
25 // ========================= MEMBER FUNCTIONS ================================ |
31 // ========================= MEMBER FUNCTIONS ================================ |
26 |
32 |
27 // --------------------------------------------------------------------------- |
33 // --------------------------------------------------------------------------- |
28 // CStartupApplication::AppDllUid() |
34 // CStartupApplication::AppDllUid() |
51 return new CStartupApplication; |
57 return new CStartupApplication; |
52 } |
58 } |
53 |
59 |
54 GLDEF_C TInt E32Main() |
60 GLDEF_C TInt E32Main() |
55 { |
61 { |
|
62 //Make sure startup app is only started once |
|
63 TInt ret = RProperty::Define(KPSUidStartupApp, KPSStartupAppStarted, RProperty::EInt, KReadDeviceDataPolicy, KWriteDeviceDataPolicy); |
|
64 if(ret!=KErrNone) |
|
65 { |
|
66 return KErrNone; |
|
67 } |
56 return EikStart::RunApplication(NewApplication); |
68 return EikStart::RunApplication(NewApplication); |
57 } |
69 } |
58 |
70 |
59 #if defined(__WINS__) && !defined(EKA2) |
71 #if defined(__WINS__) && !defined(EKA2) |
60 GLDEF_C TInt E32Dll(TDllReason) |
72 GLDEF_C TInt E32Dll(TDllReason) |