|
1 /* |
|
2 * Copyright (c) 2002-2004 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: Loads polymorphic dlls |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CXNLIBRARYLOADER_H |
|
21 #define CXNLIBRARYLOADER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 |
|
26 // CONSTANTS |
|
27 //const ?type ?constant_var = ?constant; |
|
28 |
|
29 // MACROS |
|
30 //#define ?macro ?macro_def |
|
31 |
|
32 // DATA TYPES |
|
33 //enum ?declaration |
|
34 //typedef ?declaration |
|
35 //extern ?data_type; |
|
36 |
|
37 // FUNCTION PROTOTYPES |
|
38 //?type ?function_name(?arg_list); |
|
39 |
|
40 // FORWARD DECLARATIONS |
|
41 class CXnPathRepository; |
|
42 class RFs; |
|
43 class CXnArray; |
|
44 class RXnClientRequest; |
|
45 |
|
46 // CLASS DECLARATION |
|
47 |
|
48 /** |
|
49 * Locates files from a set of defined paths |
|
50 * @lib ?library |
|
51 * @since Series 60 3.1 |
|
52 */ |
|
53 class CXnLibraryLoader : public CBase |
|
54 { |
|
55 public: // Constructors and destructor |
|
56 struct CLibraryItem; |
|
57 |
|
58 /** |
|
59 * Two-phased constructor. |
|
60 * @param aRFs File server session |
|
61 */ |
|
62 IMPORT_C static CXnLibraryLoader* NewL(); |
|
63 |
|
64 /** |
|
65 * DEPRECATED |
|
66 * Two-phased constructor. |
|
67 * @param aPathRepository Path repository for handling multiple directories |
|
68 * @param aRFs File server session |
|
69 */ |
|
70 IMPORT_C static CXnLibraryLoader* NewL(CXnPathRepository& aPathRepository, RFs& aRFs); |
|
71 |
|
72 /** |
|
73 * Destructor. |
|
74 */ |
|
75 virtual ~CXnLibraryLoader(); |
|
76 |
|
77 public: // New functions |
|
78 /** |
|
79 * Load libraries by wildcard |
|
80 * @since Series 60 3.1 |
|
81 * @param aWildCard Wildcard to search |
|
82 */ |
|
83 IMPORT_C void LoadL(const TDesC& aWildCard); |
|
84 |
|
85 /** |
|
86 * Load libraries given by Definition Engine |
|
87 * @since Series 60 3.1 |
|
88 * @param aXnClient Client interface to Definition Engine |
|
89 * @param aAppUid Uid of the current application |
|
90 */ |
|
91 IMPORT_C void LoadL(RXnClientRequest& aXnClient, const TUid& aAppUid); |
|
92 /** |
|
93 * Get pointers to library functions |
|
94 * @since Series 60 3.1 |
|
95 */ |
|
96 IMPORT_C void Functions(CXnArray& aFunctions) const; |
|
97 |
|
98 public: // Functions from base classes |
|
99 |
|
100 /** |
|
101 * From ?base_class ?member_description. |
|
102 * @since Series ?XX ?SeriesXX_version |
|
103 * @param ?arg1 ?description |
|
104 * @return ?description |
|
105 */ |
|
106 //?type ?member_function( ?type ?arg1 ); |
|
107 |
|
108 protected: // New functions |
|
109 |
|
110 /** |
|
111 * ?member_description. |
|
112 * @since Series ?XX ?SeriesXX_version |
|
113 * @param ?arg1 ?description |
|
114 * @return ?description |
|
115 */ |
|
116 //?type ?member_function( ?type ?arg1 ); |
|
117 |
|
118 |
|
119 protected: // Functions from base classes |
|
120 |
|
121 /** |
|
122 * From ?base_class ?member_description |
|
123 */ |
|
124 //?type ?member_function(); |
|
125 |
|
126 private: |
|
127 |
|
128 /** |
|
129 * C++ default constructor. |
|
130 */ |
|
131 CXnLibraryLoader(); |
|
132 |
|
133 /** |
|
134 * 2nd phase constructor. |
|
135 * @param aRFs File server session |
|
136 */ |
|
137 void ConstructL(); |
|
138 |
|
139 /** |
|
140 * DEPRECATED |
|
141 * 2nd phase constructor. |
|
142 * @param aPathRepository Path repository for handling multiple directories |
|
143 * @param aRFs File server session |
|
144 */ |
|
145 void ConstructL(CXnPathRepository& aPathRepository, RFs& aRFs); |
|
146 |
|
147 /** |
|
148 * Add a library |
|
149 * @param aItem Library to add |
|
150 * @since Series 60 3.1 |
|
151 */ |
|
152 TInt AddItem(CLibraryItem* aItem); |
|
153 |
|
154 // Prohibit copy constructor if not deriving from CBase. |
|
155 // ?classname( const ?classname& ); |
|
156 // Prohibit assigment operator if not deriving from CBase. |
|
157 // ?classname& operator=( const ?classname& ); |
|
158 |
|
159 public: // Data |
|
160 // ?one_line_short_description_of_data |
|
161 //?data_declaration; |
|
162 |
|
163 protected: // Data |
|
164 // ?one_line_short_description_of_data |
|
165 //?data_declaration; |
|
166 |
|
167 private: // Data |
|
168 // Path repository, not owned by the loader |
|
169 CXnPathRepository* iPathRepository; |
|
170 // array of libraries |
|
171 RPointerArray<CLibraryItem> iLibraries; |
|
172 // file server session |
|
173 RFs* iRFs; |
|
174 }; |
|
175 |
|
176 #endif // CXnLIBRARYLOADER_H |
|
177 |
|
178 // End of File |