1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of the License "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 // |
7 // |
8 // Initial Contributors: |
8 // Initial Contributors: |
9 // Nokia Corporation - initial contribution. |
9 // Nokia Corporation - initial contribution. |
10 // |
10 // |
11 // Contributors: |
11 // Contributors: |
12 // |
12 // |
13 // Description: |
13 // Description: |
|
14 // apadll.h |
14 // |
15 // |
15 |
16 |
16 #ifndef __APADLL_H__ |
17 #ifndef __APADLL_H__ |
17 #define __APADLL_H__ |
18 #define __APADLL_H__ |
18 |
19 |
19 #if !defined(__E32STD_H__) |
|
20 #include <e32std.h> |
20 #include <e32std.h> |
21 #endif |
|
22 #if !defined(__E32BASE_H__) |
|
23 #include <e32base.h> |
21 #include <e32base.h> |
24 #endif |
|
25 #if !defined(__APADEF_H__) |
|
26 #include <apadef.h> |
22 #include <apadef.h> |
27 #endif |
|
28 #if !defined(__APPARC_H__) |
|
29 #include <apparc.h> |
23 #include <apparc.h> |
30 #endif |
24 |
|
25 class CApaApplication; |
|
26 |
|
27 NONSHARABLE_CLASS(RApaApplication) |
|
28 { |
|
29 public: |
|
30 RApaApplication(); |
|
31 void Close(); |
|
32 void CreateApplicationL(TApaApplicationFactory aApplicationFactory); // Uses the factory to create the application |
|
33 |
|
34 TFileName AppFileName() const; |
|
35 TUid AppFileUid() const; |
|
36 CApaApplication* Application(); |
|
37 inline const CApaApplication* Application() const; |
|
38 void ScheduleForAsyncDeletion(TBool aDoDelete = ETrue); |
|
39 TBool IsScheduleForAsyncDeletion() const; |
|
40 private: |
|
41 ~RApaApplication(); |
|
42 private: |
|
43 CApaApplication* iApplication; |
|
44 RBuf iAppName; |
|
45 TUid iFileUid; |
|
46 TBool iScheduledForDeletion; |
|
47 }; |
31 |
48 |
32 |
49 |
33 // classes referenced |
50 // inlines |
34 class CApaApplication; |
|
35 class RFs; |
|
36 |
51 |
37 NONSHARABLE_CLASS(CApaAppHolder) : public CBase |
52 const CApaApplication* RApaApplication::Application() const |
38 /** Provides an interface for obtaining data gathered differently for DLLs and EXEs. Derived |
53 { return const_cast<RApaApplication*>(this)->Application(); } |
39 classes create and own the application object. The equivalent of the old CApaDll derives from this.*/ |
|
40 { |
|
41 public: |
|
42 CApaAppHolder(); |
|
43 ~CApaAppHolder(); |
|
44 |
54 |
45 virtual TFileName FileName() const = 0; |
55 #endif // __APADLL_H__ |
46 virtual TUid Uid() const = 0; |
|
47 virtual CApaApplication* Application() const = 0; |
|
48 |
|
49 protected: |
|
50 void UpdateAppsRefToThis(); |
|
51 }; |
|
52 |
|
53 NONSHARABLE_CLASS(CApaExe) : public CApaAppHolder |
|
54 { |
|
55 public: |
|
56 CApaExe(); |
|
57 ~CApaExe(); |
|
58 |
|
59 TFileName FileName() const; |
|
60 TUid Uid() const; |
|
61 CApaApplication* Application() const; |
|
62 |
|
63 void CreateApplicationL(TApaApplicationFactory aApplicationFactory); // Uses the factory to create the application |
|
64 private: |
|
65 CApaApplication* iApplication; |
|
66 HBufC* iAppName; |
|
67 TUid iFileUid; |
|
68 }; |
|
69 |
|
70 #endif |
|