|
1 // Copyright (c) 1997-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 "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 // apparc.cpp |
|
15 // |
|
16 |
|
17 #include <apparc.h> // stuff everyone will want ie most things |
|
18 #include "APADLL.H" // RApaApplication |
|
19 #include "APASTD.H" // Panics etc. |
|
20 |
|
21 |
|
22 // |
|
23 // RApaApplication |
|
24 // |
|
25 |
|
26 RApaApplication::RApaApplication() : iApplication(NULL), iScheduledForDeletion(EFalse) |
|
27 {} |
|
28 |
|
29 void RApaApplication::Close() |
|
30 { |
|
31 delete this; |
|
32 } |
|
33 |
|
34 RApaApplication::~RApaApplication() |
|
35 { |
|
36 iAppName.Close(); |
|
37 delete iApplication; |
|
38 } |
|
39 |
|
40 void RApaApplication::CreateApplicationL(TApaApplicationFactory aApplicationFactory) |
|
41 { |
|
42 __ASSERT_ALWAYS(!iApplication, Panic(EPanicApplicationAlreadyExists)); |
|
43 iApplication = aApplicationFactory.CreateApplicationL(); |
|
44 User::LeaveIfNull(iApplication); |
|
45 |
|
46 iFileUid = aApplicationFactory.AppFileUid(); |
|
47 iAppName.Assign(aApplicationFactory.AppFileNameL()); |
|
48 |
|
49 iApplication->SetAppFileNameRef(iAppName); |
|
50 } |
|
51 |
|
52 TFileName RApaApplication::AppFileName() const |
|
53 { |
|
54 return iAppName; |
|
55 } |
|
56 |
|
57 TUid RApaApplication::AppFileUid()const |
|
58 { |
|
59 return iFileUid; |
|
60 } |
|
61 |
|
62 CApaApplication* RApaApplication::Application() |
|
63 { |
|
64 return iApplication; |
|
65 } |
|
66 |
|
67 void RApaApplication::ScheduleForAsyncDeletion(TBool aDoDelete) |
|
68 { |
|
69 iScheduledForDeletion = aDoDelete; |
|
70 } |
|
71 |
|
72 TBool RApaApplication::IsScheduleForAsyncDeletion() const |
|
73 { |
|
74 return iScheduledForDeletion; |
|
75 } |
|
76 |
|
77 |