|
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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Target application to be debugged by t_rmdebug.exe when testing |
|
15 // security restrictions. This application is built with various |
|
16 // capabilities by the t_rmdebug_securityX.mmp files. This allows |
|
17 // the t_rmdebug2 program to ensure that security restrictions are |
|
18 // properly enforced by the DSS/DDD subsystem. |
|
19 // |
|
20 // |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <e32base_private.h> |
|
24 #include <e32cons.h> |
|
25 #include <e32test.h> |
|
26 #include <e32ldr.h> |
|
27 #include <e32cmn.h> |
|
28 #include <e32cmn_private.h> |
|
29 #include "t_rmdebug_security.h" |
|
30 |
|
31 CRunModeApp* CRunModeApp::NewL() |
|
32 // |
|
33 // CRunModeApp::NewL |
|
34 // |
|
35 { |
|
36 CRunModeApp* self = new(ELeave) CRunModeApp(); |
|
37 |
|
38 self->ConstructL(); |
|
39 |
|
40 return self; |
|
41 } |
|
42 |
|
43 CRunModeApp::CRunModeApp() |
|
44 // |
|
45 // CRunModeApp constructor |
|
46 // |
|
47 { |
|
48 } |
|
49 |
|
50 CRunModeApp::~CRunModeApp() |
|
51 // |
|
52 // CRunModeApp destructor |
|
53 // |
|
54 { |
|
55 } |
|
56 |
|
57 void CRunModeApp::ConstructL() |
|
58 // |
|
59 // CRunModeApp::ConstructL |
|
60 // |
|
61 { |
|
62 } |
|
63 |
|
64 void CRunModeApp::TestWaitDebug() |
|
65 // |
|
66 // CRunModeApp::TestWaitDebug |
|
67 // |
|
68 { |
|
69 RProcess::Rendezvous(KErrNone); |
|
70 |
|
71 // Wait a 3secs then quit (long enough to test, but not hang around forever) |
|
72 User::After(3000000); |
|
73 } |
|
74 |
|
75 GLDEF_C TInt E32Main() |
|
76 // |
|
77 // Entry point for run mode debug app test program |
|
78 // |
|
79 { |
|
80 TInt ret = KErrNone; |
|
81 |
|
82 // client |
|
83 CTrapCleanup* trap = CTrapCleanup::New(); |
|
84 if (!trap) |
|
85 return KErrNoMemory; |
|
86 |
|
87 CRunModeApp* myApp = CRunModeApp::NewL(); |
|
88 if (myApp != NULL) |
|
89 { |
|
90 __UHEAP_MARK; |
|
91 TRAP(ret,myApp->TestWaitDebug()); |
|
92 __UHEAP_MARKEND; |
|
93 |
|
94 delete myApp; |
|
95 } |
|
96 |
|
97 delete trap; |
|
98 |
|
99 return ret; |
|
100 } |