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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // This file contains the implementation of
15 // the CImplementationInformation class.
16 // Provide the inline implementation of CImplementationInformation
17 // CImplementationInformation provides access to information on a particular implementation
26 Intended Usage : Accessor for this implementation's human readable name
28 @return The human readable name for this implementation
29 @pre CImplementationInformation is fully constructed and initialized
31 const TDesC& CImplementationInformation::DisplayName() const
33 if(iDisplayName == NULL)
41 Intended Usage : Accessor for this implementation's default binary data
43 @return The data type which this implementation supports
44 @pre CImplementationInformation is fully constructed and initialized
46 const TDesC8& CImplementationInformation::DataType() const
56 Intended Usage : Accessor for this implementation's opaque binary data
58 @return The opaque data which is available for this implementation
59 @pre CImplementationInformation is fully constructed and initialized
61 const TDesC8& CImplementationInformation::OpaqueData() const
63 if(iOpaqueData == NULL)
71 Intended Usage : Accessor for this implementation's Uid
73 @return The Uid of this implementation
74 @pre CImplementationInformation is fully constructed and initialized
76 TUid CImplementationInformation::ImplementationUid() const
78 return iImplementationUid;
83 Intended Usage : Accessor for the version number of this implementation
85 @return The version number of this implementation
86 @pre CImplementationInformation is fully constructed and initialized
88 TInt CImplementationInformation::Version() const
95 Intended Usage : Accessor for whether this implementation is currently
98 @return Flag indicating whether this implementation is disabled
99 @pre CImplementationInformation is fully constructed and initialized
101 TBool CImplementationInformation::Disabled() const
108 Intended Usage : Marks this implementation as disabled, or enabled.
109 Note that this function should not be used by any ECOM client side as it will have no effect at all
110 on the implementation information stored in the server side.
112 @param aDisabled ETrue to indicate this implementation should be disabled, EFalse for enabled.
113 @pre CImplementationInformation is fully constructed and initialized
114 @post Implementation is marked as.
116 void CImplementationInformation::SetDisabled(TBool aDisabled)
118 iDisabled = aDisabled;
122 Intended Usage : Returns the drive that this implementation is installed on
123 Error Condition : None
125 @return The drive that this implementation is on
126 @pre CImplementationInformation is fully constructed.
128 TDriveUnit CImplementationInformation::Drive() const
135 Intended Usage : Accessor for whether this implementation is to be loaded
137 @return Flag indicating whether this implementation is to be loaded from ROM only
138 @pre CImplementationInformation is fully constructed
140 TBool CImplementationInformation::RomOnly() const
146 Intended Usage : Accessor for whether this implementation is on ROM or is
147 a later version of one on ROM
148 @return Flag indicating whether this implementation is on ROM or is a later version of one on ROM
149 @pre CImplementationInformation is fully constructed
151 TBool CImplementationInformation::RomBased() const
156 Intended Usage: Returns the VID of the plug-in that this implementation belongs to.
157 The VID is the VendorId for the plug-in's DLL
158 @pre CImplementationInformation is fully constructed
159 @return VendorId of the plug-in that this implementation belongs to.
161 TVendorId CImplementationInformation::VendorId() const
167 Intended Usage: Sets the VID of the plug-in that this implementation belongs to.
168 The VID is the VendorId for the plug-in's DLL.
170 @pre CImplementationInformation is fully constructed
171 @param aVid VendorId of the plug-in that this implementation belongs to.
173 void CImplementationInformation::SetVendorId(const TVendorId aVid)
178 // ____________________________________________________________________________
179 // Provide the inline implementations of useful utilitiy functions related to
180 // CImplementationInformation for use in client and server sides.
184 Comparison function used in ordering functions (e.g. as used with TLinearOrder)
185 where ECOM UID identified structures are held in ordered RArray/RPointerArray
189 @param aUid1 First UID value of comparison
190 @param aUid2 Second UID Value of comparison
191 @return Returns 1 when aUid1 > aUid2; -1 when aUid1 < aUid2; 0 when they equal
193 inline TInt CompareTUidValues(TInt aUid1, TInt aUid2)
195 // This has been implemented as 'return aUid1-aUid2' previously.
196 // This can lead to overflow problems when comparing 2 signed integers
197 // if the operands are large enough: large aUid minus large negative aUid2
198 // returns a negative value due to arithmetic overflow of the result when
199 // you'd want a positive value. Hence the longer hand implementation below.