williamr@2
|
1 |
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
2 |
// All rights reserved.
|
williamr@2
|
3 |
// This component and the accompanying materials are made available
|
williamr@2
|
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
|
williamr@2
|
5 |
// which accompanies this distribution, and is available
|
williamr@2
|
6 |
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
|
williamr@2
|
7 |
//
|
williamr@2
|
8 |
// Initial Contributors:
|
williamr@2
|
9 |
// Nokia Corporation - initial contribution.
|
williamr@2
|
10 |
//
|
williamr@2
|
11 |
// Contributors:
|
williamr@2
|
12 |
//
|
williamr@2
|
13 |
// Description:
|
williamr@2
|
14 |
// This file contains the definition of
|
williamr@2
|
15 |
// the CImplementationInformation class.
|
williamr@2
|
16 |
//
|
williamr@2
|
17 |
//
|
williamr@2
|
18 |
|
williamr@2
|
19 |
|
williamr@2
|
20 |
|
williamr@2
|
21 |
#ifndef __IMPLEMENTATIONINFORMATION_H__
|
williamr@2
|
22 |
#define __IMPLEMENTATIONINFORMATION_H__
|
williamr@2
|
23 |
|
williamr@2
|
24 |
#include <s32std.h>
|
williamr@2
|
25 |
#include <f32file.h>
|
williamr@2
|
26 |
|
williamr@2
|
27 |
// ____________________________________________________________________________________
|
williamr@2
|
28 |
//
|
williamr@2
|
29 |
/**
|
williamr@2
|
30 |
CImplementationInformation
|
williamr@2
|
31 |
|
williamr@2
|
32 |
This class acts as the container for the registration data
|
williamr@2
|
33 |
relating to a particular Interface Implementation.
|
williamr@2
|
34 |
Note that this class is used in both the ECOM client and server side,
|
williamr@2
|
35 |
For the client side only the API used to extract the registration data
|
williamr@2
|
36 |
should be used.
|
williamr@2
|
37 |
|
williamr@2
|
38 |
It is available to the client to allow access to the
|
williamr@2
|
39 |
registered characteristics of the implementation.
|
williamr@2
|
40 |
These characteristics are:
|
williamr@2
|
41 |
|
williamr@2
|
42 |
ImplementationUid() The Uid of this implementation.
|
williamr@2
|
43 |
|
williamr@2
|
44 |
Version() The version number of this implementation.
|
williamr@2
|
45 |
|
williamr@2
|
46 |
DisplayName() The human readable name for this implementation returned
|
williamr@2
|
47 |
as a 16 bit descriptor.
|
williamr@2
|
48 |
|
williamr@2
|
49 |
DataType() The data type which this implementation supports, returned
|
williamr@2
|
50 |
as an 8 bit descriptor.
|
williamr@2
|
51 |
|
williamr@2
|
52 |
OpaqueData() The opaque data which is registered for this implementation,
|
williamr@2
|
53 |
returned as an 8 bit descriptor.
|
williamr@2
|
54 |
|
williamr@2
|
55 |
RomOnly() The flag indicating whether this implementation is to be loaded
|
williamr@2
|
56 |
from ROM only.
|
williamr@2
|
57 |
|
williamr@2
|
58 |
RomBased() The flag recording whether this implementation is on ROM or is
|
williamr@2
|
59 |
a later version of one on ROM.
|
williamr@2
|
60 |
|
williamr@2
|
61 |
VendorId() The Vendor ID of the plug-in which this implementation belongs to
|
williamr@2
|
62 |
|
williamr@2
|
63 |
@publishedAll
|
williamr@2
|
64 |
@released
|
williamr@2
|
65 |
*/
|
williamr@2
|
66 |
|
williamr@2
|
67 |
NONSHARABLE_CLASS(CImplementationInformation) : public CBase
|
williamr@2
|
68 |
{
|
williamr@2
|
69 |
public:
|
williamr@2
|
70 |
|
williamr@2
|
71 |
static CImplementationInformation* NewLC(TBool aClientSide,RReadStream& aStream);
|
williamr@2
|
72 |
|
williamr@2
|
73 |
static CImplementationInformation* NewL(TUid aUid,
|
williamr@2
|
74 |
TInt aVersion,
|
williamr@2
|
75 |
HBufC* aName,
|
williamr@2
|
76 |
HBufC8* aDataType,
|
williamr@2
|
77 |
HBufC8* aOpaqueData,
|
williamr@2
|
78 |
TDriveUnit aDrive,
|
williamr@2
|
79 |
TBool aRomOnly,
|
williamr@2
|
80 |
TBool aRomBased);
|
williamr@2
|
81 |
|
williamr@2
|
82 |
~CImplementationInformation();
|
williamr@2
|
83 |
|
williamr@2
|
84 |
inline const TDesC& DisplayName() const;
|
williamr@2
|
85 |
|
williamr@2
|
86 |
inline const TDesC8& DataType() const;
|
williamr@2
|
87 |
|
williamr@2
|
88 |
inline const TDesC8& OpaqueData() const;
|
williamr@2
|
89 |
|
williamr@2
|
90 |
inline TUid ImplementationUid() const;
|
williamr@2
|
91 |
|
williamr@2
|
92 |
inline TInt Version() const;
|
williamr@2
|
93 |
|
williamr@2
|
94 |
inline TBool Disabled() const;
|
williamr@2
|
95 |
|
williamr@2
|
96 |
//This function should not be used by any ECOM client as it will have no effect
|
williamr@2
|
97 |
//at all on the implementation information stored in the server side.
|
williamr@2
|
98 |
inline void SetDisabled(TBool aDisabled);
|
williamr@2
|
99 |
|
williamr@2
|
100 |
void ExternalizeL(TBool aClientSide,RWriteStream& aStream) const;
|
williamr@2
|
101 |
|
williamr@2
|
102 |
void InternalizeL(TBool aClientSide,RReadStream& aStream);
|
williamr@2
|
103 |
inline TDriveUnit Drive() const;
|
williamr@2
|
104 |
inline TBool RomOnly() const;
|
williamr@2
|
105 |
inline TBool RomBased() const;
|
williamr@2
|
106 |
void SetRomBased(TBool aRomBased);
|
williamr@2
|
107 |
inline TVendorId VendorId() const;
|
williamr@2
|
108 |
void SetDrive(TDriveUnit aDrive);
|
williamr@2
|
109 |
|
williamr@2
|
110 |
public:
|
williamr@2
|
111 |
// The following function is categorised as @internalComponent
|
williamr@2
|
112 |
//and should not be used by ECOM clients.
|
williamr@2
|
113 |
inline void SetVendorId(const TVendorId aVid);
|
williamr@2
|
114 |
|
williamr@2
|
115 |
private:
|
williamr@2
|
116 |
|
williamr@2
|
117 |
CImplementationInformation();
|
williamr@2
|
118 |
|
williamr@2
|
119 |
CImplementationInformation(TUid aUid,
|
williamr@2
|
120 |
TInt aVersion,
|
williamr@2
|
121 |
HBufC* aName,
|
williamr@2
|
122 |
HBufC8* aDataType,
|
williamr@2
|
123 |
HBufC8* aOpaqueData,
|
williamr@2
|
124 |
TDriveUnit aDrive,
|
williamr@2
|
125 |
TBool aRomOnly,
|
williamr@2
|
126 |
TBool aRomBased);
|
williamr@2
|
127 |
|
williamr@2
|
128 |
private:
|
williamr@2
|
129 |
/** The implementation UID */
|
williamr@2
|
130 |
|
williamr@2
|
131 |
TUid iImplementationUid;
|
williamr@2
|
132 |
/** The implementation version */
|
williamr@2
|
133 |
|
williamr@2
|
134 |
TInt iVersion;
|
williamr@2
|
135 |
/** This implementations human readable name intended for display in UI implementations */
|
williamr@2
|
136 |
|
williamr@2
|
137 |
HBufC* iDisplayName;
|
williamr@2
|
138 |
/**
|
williamr@2
|
139 |
The type of data this implementation is registered to handle :
|
williamr@2
|
140 |
Used for matching against the run-time cue provided by the client
|
williamr@2
|
141 |
during default interface implementation resolution.
|
williamr@2
|
142 |
*/
|
williamr@2
|
143 |
|
williamr@2
|
144 |
HBufC8* iData;
|
williamr@2
|
145 |
/**
|
williamr@2
|
146 |
Data registered for this implementation which can be used by the client
|
williamr@2
|
147 |
during non-default resolution operations but is ignored by the framework.
|
williamr@2
|
148 |
*/
|
williamr@2
|
149 |
|
williamr@2
|
150 |
HBufC8* iOpaqueData;
|
williamr@2
|
151 |
/** The flag recording if this implementation is disabled or enabled */
|
williamr@2
|
152 |
|
williamr@2
|
153 |
TBool iDisabled;
|
williamr@2
|
154 |
/** The drive that this plug-in resides on */
|
williamr@2
|
155 |
TDriveUnit iDrive;
|
williamr@2
|
156 |
/** The flag recording whether this implementation may only be loaded
|
williamr@2
|
157 |
from read-only internal media */
|
williamr@2
|
158 |
TBool iRomOnly;
|
williamr@2
|
159 |
/** This flag records whether this implementation was discovered on
|
williamr@2
|
160 |
read-only internal media or that it is a later version of one that was */
|
williamr@2
|
161 |
TBool iRomBased;
|
williamr@2
|
162 |
/** The Vendor ID of the plug-in which this implementation belongs to*/
|
williamr@2
|
163 |
TVendorId iVid;
|
williamr@2
|
164 |
}; // End CImplementationInformation
|
williamr@2
|
165 |
|
williamr@2
|
166 |
/**
|
williamr@2
|
167 |
Simplifies the definition of functions which return registry information
|
williamr@2
|
168 |
|
williamr@2
|
169 |
@publishedAll
|
williamr@2
|
170 |
@released
|
williamr@2
|
171 |
*/
|
williamr@2
|
172 |
typedef RArray<CImplementationInformation*> RImplInfoArray;
|
williamr@2
|
173 |
|
williamr@2
|
174 |
/**
|
williamr@2
|
175 |
Simplifies the definition of functions which return registry information
|
williamr@2
|
176 |
|
williamr@2
|
177 |
@publishedAll
|
williamr@2
|
178 |
@released
|
williamr@2
|
179 |
*/
|
williamr@2
|
180 |
typedef RPointerArray<CImplementationInformation> RImplInfoPtrArray;
|
williamr@2
|
181 |
|
williamr@2
|
182 |
|
williamr@2
|
183 |
#include <ecom/implementationinformation.inl>
|
williamr@2
|
184 |
|
williamr@2
|
185 |
#endif // __IMPLEMENTATIONINFORMATION_H__
|