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 "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.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
23 Intended Usage : Accessor for this implementation's human readable name
25 @return The human readable name for this implementation
26 @pre CImplementationInformation is fully constructed and initialized
28 const TDesC& CImplementationInformation::DisplayName() const
30 if(iDisplayName == NULL)
38 Intended Usage : Accessor for this implementation's default binary data
40 @return The data type which this implementation supports
41 @pre CImplementationInformation is fully constructed and initialized
43 const TDesC8& CImplementationInformation::DataType() const
53 Intended Usage : Accessor for this implementation's opaque binary data
55 @return The opaque data which is available for this implementation
56 @pre CImplementationInformation is fully constructed and initialized
58 const TDesC8& CImplementationInformation::OpaqueData() const
60 if(iOpaqueData == NULL)
68 Intended Usage : Accessor for this implementation's Uid
70 @return The Uid of this implementation
71 @pre CImplementationInformation is fully constructed and initialized
73 TUid CImplementationInformation::ImplementationUid() const
75 return iImplementationUid;
80 Intended Usage : Accessor for the version number of this implementation
82 @return The version number of this implementation
83 @pre CImplementationInformation is fully constructed and initialized
85 TInt CImplementationInformation::Version() const
92 Intended Usage : Accessor for whether this implementation is currently
95 @return Flag indicating whether this implementation is disabled
96 @pre CImplementationInformation is fully constructed and initialized
98 TBool CImplementationInformation::Disabled() const
105 Intended Usage : Marks this implementation as disabled, or enabled.
106 Note that this function should not be used by any ECOM client side as it will have no effect at all
107 on the implementation information stored in the server side.
109 @param aDisabled ETrue to indicate this implementation should be disabled, EFalse for enabled.
110 @pre CImplementationInformation is fully constructed and initialized
111 @post Implementation is marked as.
113 void CImplementationInformation::SetDisabled(TBool aDisabled)
115 iDisabled = aDisabled;
119 Intended Usage : Returns the drive that this implementation is installed on
120 Error Condition : None
122 @return The drive that this implementation is on
123 @pre CImplementationInformation is fully constructed.
125 TDriveUnit CImplementationInformation::Drive() const
132 Intended Usage : Accessor for whether this implementation is to be loaded
134 @return Flag indicating whether this implementation is to be loaded from ROM only
135 @pre CImplementationInformation is fully constructed
137 TBool CImplementationInformation::RomOnly() const
143 Intended Usage : Accessor for whether this implementation is on ROM or is
144 a later version of one on ROM
145 @return Flag indicating whether this implementation is on ROM or is a later version of one on ROM
146 @pre CImplementationInformation is fully constructed
148 TBool CImplementationInformation::RomBased() const
153 Intended Usage: Returns the VID of the plug-in that this implementation belongs to.
154 The VID is the VendorId for the plug-in's DLL
155 @pre CImplementationInformation is fully constructed
156 @return VendorId of the plug-in that this implementation belongs to.
158 TVendorId CImplementationInformation::VendorId() const
164 Intended Usage: Sets the VID of the plug-in that this implementation belongs to.
165 The VID is the VendorId for the plug-in's DLL.
167 @pre CImplementationInformation is fully constructed
168 @param aVid VendorId of the plug-in that this implementation belongs to.
170 void CImplementationInformation::SetVendorId(const TVendorId aVid)
175 // ____________________________________________________________________________
176 // Provide the inline implementations of useful utilitiy functions related to
177 // CImplementationInformation for use in client and server sides.
181 Comparison function used in ordering functions (e.g. as used with TLinearOrder)
182 where ECOM UID identified structures are held in ordered RArray/RPointerArray
186 @param aUid1 First UID value of comparison
187 @param aUid2 Second UID Value of comparison
188 @return Returns 1 when aUid1 > aUid2; -1 when aUid1 < aUid2; 0 when they equal
190 inline TInt CompareTUidValues(TInt aUid1, TInt aUid2)
192 // This has been implemented as 'return aUid1-aUid2' previously.
193 // This can lead to overflow problems when comparing 2 signed integers
194 // if the operands are large enough: large aUid minus large negative aUid2
195 // returns a negative value due to arithmetic overflow of the result when
196 // you'd want a positive value. Hence the longer hand implementation below.