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 "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
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.symbianfoundation.org/legal/licencesv10.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 // This file contains the definition of |
14 // This file contains the definition of the CImplementationInformation API class. |
15 // the CImplementationInformation class. |
|
16 // |
15 // |
17 // |
16 // |
18 |
17 |
19 |
18 /** |
|
19 @file |
|
20 @publishedAll |
|
21 @released |
|
22 */ |
20 |
23 |
21 #ifndef __IMPLEMENTATIONINFORMATION_H__ |
24 #ifndef __IMPLEMENTATIONINFORMATION_H__ |
22 #define __IMPLEMENTATIONINFORMATION_H__ |
25 #define __IMPLEMENTATIONINFORMATION_H__ |
23 |
26 |
|
27 // ____________________________________________________________________________ |
|
28 // INCLUDES |
|
29 |
24 #include <s32std.h> |
30 #include <s32std.h> |
25 #include <f32file.h> |
31 #include <f32file.h> |
26 |
32 |
27 // ____________________________________________________________________________________ |
33 |
28 // |
34 // ____________________________________________________________________________ |
29 /** |
35 // TYPES |
30 CImplementationInformation |
36 |
31 |
37 /** |
32 This class acts as the container for the registration data |
38 Simplifies the definition of extended interfaces array |
33 relating to a particular Interface Implementation. |
39 @publishedPartner |
34 Note that this class is used in both the ECOM client and server side, |
|
35 For the client side only the API used to extract the registration data |
|
36 should be used. |
|
37 |
|
38 It is available to the client to allow access to the |
|
39 registered characteristics of the implementation. |
|
40 These characteristics are: |
|
41 |
|
42 ImplementationUid() The Uid of this implementation. |
|
43 |
|
44 Version() The version number of this implementation. |
|
45 |
|
46 DisplayName() The human readable name for this implementation returned |
|
47 as a 16 bit descriptor. |
|
48 |
|
49 DataType() The data type which this implementation supports, returned |
|
50 as an 8 bit descriptor. |
|
51 |
|
52 OpaqueData() The opaque data which is registered for this implementation, |
|
53 returned as an 8 bit descriptor. |
|
54 |
|
55 RomOnly() The flag indicating whether this implementation is to be loaded |
|
56 from ROM only. |
|
57 |
|
58 RomBased() The flag recording whether this implementation is on ROM or is |
|
59 a later version of one on ROM. |
|
60 |
|
61 VendorId() The Vendor ID of the plug-in which this implementation belongs to |
|
62 |
|
63 @publishedAll |
|
64 @released |
40 @released |
65 */ |
41 */ |
66 |
42 // To be used internally by ECOM and by Phone Manufacturers |
|
43 typedef RArray<TUid> RExtendedInterfacesArray; |
|
44 |
|
45 |
|
46 |
|
47 // ____________________________________________________________________________ |
|
48 // CLASSES |
|
49 |
|
50 /** |
|
51 The CimplementationInformation class acts as the container for the registration |
|
52 data relating to a particular interface implementation. |
|
53 Note that this class is used in both the ECOM client and server side hence the |
|
54 mixed API classification seen below. For the client side only the API used to |
|
55 extract the registration data should be used. |
|
56 */ |
67 NONSHARABLE_CLASS(CImplementationInformation) : public CBase |
57 NONSHARABLE_CLASS(CImplementationInformation) : public CBase |
68 { |
58 { |
69 public: |
59 public: // internalComponent APIs |
70 |
60 // Internal methods used only inside ECOM , not for client use. |
71 static CImplementationInformation* NewLC(TBool aClientSide,RReadStream& aStream); |
61 |
72 |
62 static CImplementationInformation* NewLC(TBool aClientSide, |
73 static CImplementationInformation* NewL(TUid aUid, |
63 RReadStream& aStream); |
74 TInt aVersion, |
64 |
|
65 static CImplementationInformation* NewL(TUid aUid, |
|
66 TInt aVersion, |
75 HBufC* aName, |
67 HBufC* aName, |
76 HBufC8* aDataType, |
68 HBufC8* aDataType, |
77 HBufC8* aOpaqueData, |
69 HBufC8* aOpaqueData, |
78 TDriveUnit aDrive, |
70 TDriveUnit aDrive, |
79 TBool aRomOnly, |
71 TBool aRomOnly, |
80 TBool aRomBased); |
72 TBool aRomBased); |
|
73 static CImplementationInformation* NewL(TUid aUid, |
|
74 TInt aVersion, |
|
75 HBufC* aName, |
|
76 HBufC8* aDataType, |
|
77 HBufC8* aOpaqueData, |
|
78 TDriveUnit aDrive, |
|
79 TBool aRomOnly, |
|
80 TBool aRomBased, |
|
81 RExtendedInterfacesArray* aExtendedInterfaces); |
81 |
82 |
82 ~CImplementationInformation(); |
83 ~CImplementationInformation(); |
83 |
84 |
|
85 public: // publishedAll APIs |
|
86 // Available for use by all clients |
|
87 |
84 inline const TDesC& DisplayName() const; |
88 inline const TDesC& DisplayName() const; |
85 |
89 |
86 inline const TDesC8& DataType() const; |
90 inline const TDesC8& DataType() const; |
87 |
|
88 inline const TDesC8& OpaqueData() const; |
91 inline const TDesC8& OpaqueData() const; |
89 |
92 |
90 inline TUid ImplementationUid() const; |
93 inline TUid ImplementationUid() const; |
91 |
|
92 inline TInt Version() const; |
94 inline TInt Version() const; |
93 |
95 |
94 inline TBool Disabled() const; |
|
95 |
|
96 //This function should not be used by any ECOM client as it will have no effect |
|
97 //at all on the implementation information stored in the server side. |
|
98 inline void SetDisabled(TBool aDisabled); |
|
99 |
|
100 void ExternalizeL(TBool aClientSide,RWriteStream& aStream) const; |
|
101 |
|
102 void InternalizeL(TBool aClientSide,RReadStream& aStream); |
|
103 inline TDriveUnit Drive() const; |
96 inline TDriveUnit Drive() const; |
|
97 |
104 inline TBool RomOnly() const; |
98 inline TBool RomOnly() const; |
105 inline TBool RomBased() const; |
99 inline TBool RomBased() const; |
|
100 |
|
101 inline TVendorId VendorId() const; |
|
102 |
|
103 inline TBool Disabled() const; |
|
104 |
|
105 // This function should not be used by any ECOM client as it will have no |
|
106 // effect at all on the implementation information stored in the server side |
|
107 inline void SetDisabled(TBool aDisabled); |
|
108 |
|
109 IMPORT_C void GetExtendedInterfaceListL(RExtendedInterfacesArray& aList); |
|
110 |
|
111 public: // internalComponent APIs |
|
112 // Internal methods used inside ECOM, not for client use. |
|
113 |
|
114 void ExternalizeL(TBool aClientSide,RWriteStream& aStream) const; |
|
115 void InternalizeL(TBool aClientSide,RReadStream& aStream); |
|
116 |
106 void SetRomBased(TBool aRomBased); |
117 void SetRomBased(TBool aRomBased); |
107 inline TVendorId VendorId() const; |
|
108 void SetDrive(TDriveUnit aDrive); |
118 void SetDrive(TDriveUnit aDrive); |
109 |
119 |
110 public: |
|
111 // The following function is categorised as @internalComponent |
|
112 //and should not be used by ECOM clients. |
|
113 inline void SetVendorId(const TVendorId aVid); |
120 inline void SetVendorId(const TVendorId aVid); |
114 |
121 |
115 private: |
122 void AddExtendedInterfaceL(const TUid& aExtendedInterface); |
116 |
123 RExtendedInterfacesArray* GetExtendedInterfaceList(); |
|
124 |
|
125 private: // internalComponent APIs |
|
126 // Internal methods used inside ECOM, not for client use. |
|
127 |
117 CImplementationInformation(); |
128 CImplementationInformation(); |
118 |
129 |
119 CImplementationInformation(TUid aUid, |
130 CImplementationInformation(TUid aUid, |
120 TInt aVersion, |
131 TInt aVersion, |
121 HBufC* aName, |
132 HBufC* aName, |
122 HBufC8* aDataType, |
133 HBufC8* aDataType, |
123 HBufC8* aOpaqueData, |
134 HBufC8* aOpaqueData, |
124 TDriveUnit aDrive, |
135 TDriveUnit aDrive, |
125 TBool aRomOnly, |
136 TBool aRomOnly, |
126 TBool aRomBased); |
137 TBool aRomBased); |
127 |
138 |
|
139 CImplementationInformation(TUid aUid, |
|
140 TInt aVersion, |
|
141 HBufC* aName, |
|
142 HBufC8* aDataType, |
|
143 HBufC8* aOpaqueData, |
|
144 TDriveUnit aDrive, |
|
145 TBool aRomOnly, |
|
146 TBool aRomBased, |
|
147 RExtendedInterfacesArray* aExtendedInterfaces); |
|
148 |
128 private: |
149 private: |
129 /** The implementation UID */ |
150 /** The implementation UID */ |
130 |
|
131 TUid iImplementationUid; |
151 TUid iImplementationUid; |
|
152 |
132 /** The implementation version */ |
153 /** The implementation version */ |
133 |
|
134 TInt iVersion; |
154 TInt iVersion; |
135 /** This implementations human readable name intended for display in UI implementations */ |
155 |
136 |
156 /** This implementations human readable name intended for display in |
|
157 UI implementations */ |
137 HBufC* iDisplayName; |
158 HBufC* iDisplayName; |
138 /** |
159 |
139 The type of data this implementation is registered to handle : |
160 /** The type of data this implementation is registered to handle : |
140 Used for matching against the run-time cue provided by the client |
161 Used for matching against the run-time cue provided by the client |
141 during default interface implementation resolution. |
162 during default interface implementation resolution. |
142 */ |
163 */ |
143 |
|
144 HBufC8* iData; |
164 HBufC8* iData; |
145 /** |
165 |
146 Data registered for this implementation which can be used by the client |
166 /** Data registered for this implementation which can be used by the client |
147 during non-default resolution operations but is ignored by the framework. |
167 during non-default resolution operations but is ignored by the framework. |
148 */ |
168 */ |
149 |
|
150 HBufC8* iOpaqueData; |
169 HBufC8* iOpaqueData; |
151 /** The flag recording if this implementation is disabled or enabled */ |
170 |
152 |
171 /** The flag recording if this implementation is disabled or enabled */ |
153 TBool iDisabled; |
172 TBool iDisabled; |
154 /** The drive that this plug-in resides on */ |
173 |
|
174 /** The drive that this plug-in resides on */ |
155 TDriveUnit iDrive; |
175 TDriveUnit iDrive; |
156 /** The flag recording whether this implementation may only be loaded |
176 |
|
177 /** The flag recording whether this implementation may only be loaded |
157 from read-only internal media */ |
178 from read-only internal media */ |
158 TBool iRomOnly; |
179 TBool iRomOnly; |
159 /** This flag records whether this implementation was discovered on |
180 |
|
181 /** This flag records whether this implementation was discovered on |
160 read-only internal media or that it is a later version of one that was */ |
182 read-only internal media or that it is a later version of one that was */ |
161 TBool iRomBased; |
183 TBool iRomBased; |
|
184 |
162 /** The Vendor ID of the plug-in which this implementation belongs to*/ |
185 /** The Vendor ID of the plug-in which this implementation belongs to*/ |
163 TVendorId iVid; |
186 TVendorId iVid; |
|
187 |
|
188 /** Array of extended interfaces.*/ |
|
189 RExtendedInterfacesArray* iExtendedInterfaceList; |
|
190 |
164 }; // End CImplementationInformation |
191 }; // End CImplementationInformation |
165 |
192 |
166 /** |
193 |
167 Simplifies the definition of functions which return registry information |
194 // ____________________________________________________________________________ |
168 |
195 // TYPES |
169 @publishedAll |
196 |
170 @released |
197 /** |
|
198 Simplifies the definition of functions which return registry information |
171 */ |
199 */ |
172 typedef RArray<CImplementationInformation*> RImplInfoArray; |
200 typedef RArray<CImplementationInformation*> RImplInfoArray; |
173 |
201 |
174 /** |
202 /** |
175 Simplifies the definition of functions which return registry information |
203 Simplifies the definition of functions which return registry information |
176 |
|
177 @publishedAll |
|
178 @released |
|
179 */ |
204 */ |
180 typedef RPointerArray<CImplementationInformation> RImplInfoPtrArray; |
205 typedef RPointerArray<CImplementationInformation> RImplInfoPtrArray; |
181 |
206 |
182 |
207 |
|
208 // ____________________________________________________________________________ |
|
209 // INLINES |
|
210 |
183 #include <ecom/implementationinformation.inl> |
211 #include <ecom/implementationinformation.inl> |
184 |
212 |
|
213 |
185 #endif // __IMPLEMENTATIONINFORMATION_H__ |
214 #endif // __IMPLEMENTATIONINFORMATION_H__ |