1.1 --- a/epoc32/include/ecom/implementationinformation.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ b/epoc32/include/ecom/implementationinformation.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -1,9 +1,9 @@
1.4 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 // All rights reserved.
1.6 // This component and the accompanying materials are made available
1.7 -// 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
1.8 +// under the terms of "Eclipse Public License v1.0"
1.9 // which accompanies this distribution, and is available
1.10 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.12 //
1.13 // Initial Contributors:
1.14 // Nokia Corporation - initial contribution.
1.15 @@ -11,175 +11,204 @@
1.16 // Contributors:
1.17 //
1.18 // Description:
1.19 -// This file contains the definition of
1.20 -// the CImplementationInformation class.
1.21 +// This file contains the definition of the CImplementationInformation API class.
1.22 //
1.23 //
1.24
1.25 -
1.26 +/**
1.27 + @file
1.28 + @publishedAll
1.29 + @released
1.30 +*/
1.31
1.32 #ifndef __IMPLEMENTATIONINFORMATION_H__
1.33 #define __IMPLEMENTATIONINFORMATION_H__
1.34
1.35 +// ____________________________________________________________________________
1.36 +// INCLUDES
1.37 +
1.38 #include <s32std.h>
1.39 #include <f32file.h>
1.40
1.41 -// ____________________________________________________________________________________
1.42 -//
1.43 +
1.44 +// ____________________________________________________________________________
1.45 +// TYPES
1.46 +
1.47 /**
1.48 -CImplementationInformation
1.49 -
1.50 -This class acts as the container for the registration data
1.51 -relating to a particular Interface Implementation.
1.52 -Note that this class is used in both the ECOM client and server side,
1.53 -For the client side only the API used to extract the registration data
1.54 -should be used.
1.55 -
1.56 -It is available to the client to allow access to the
1.57 -registered characteristics of the implementation.
1.58 -These characteristics are:
1.59 -
1.60 -ImplementationUid() The Uid of this implementation.
1.61 -
1.62 -Version() The version number of this implementation.
1.63 -
1.64 -DisplayName() The human readable name for this implementation returned
1.65 - as a 16 bit descriptor.
1.66 -
1.67 -DataType() The data type which this implementation supports, returned
1.68 - as an 8 bit descriptor.
1.69 -
1.70 -OpaqueData() The opaque data which is registered for this implementation,
1.71 - returned as an 8 bit descriptor.
1.72 -
1.73 -RomOnly() The flag indicating whether this implementation is to be loaded
1.74 - from ROM only.
1.75 -
1.76 -RomBased() The flag recording whether this implementation is on ROM or is
1.77 - a later version of one on ROM.
1.78 -
1.79 -VendorId() The Vendor ID of the plug-in which this implementation belongs to
1.80 -
1.81 -@publishedAll
1.82 +Simplifies the definition of extended interfaces array
1.83 +@publishedPartner
1.84 @released
1.85 */
1.86 +// To be used internally by ECOM and by Phone Manufacturers
1.87 +typedef RArray<TUid> RExtendedInterfacesArray;
1.88
1.89 +
1.90 +
1.91 +// ____________________________________________________________________________
1.92 +// CLASSES
1.93 +
1.94 +/**
1.95 +The CimplementationInformation class acts as the container for the registration
1.96 +data relating to a particular interface implementation.
1.97 +Note that this class is used in both the ECOM client and server side hence the
1.98 +mixed API classification seen below. For the client side only the API used to
1.99 +extract the registration data should be used.
1.100 +*/
1.101 NONSHARABLE_CLASS(CImplementationInformation) : public CBase
1.102 {
1.103 -public:
1.104 -
1.105 - static CImplementationInformation* NewLC(TBool aClientSide,RReadStream& aStream);
1.106 -
1.107 - static CImplementationInformation* NewL(TUid aUid,
1.108 - TInt aVersion,
1.109 +public: // internalComponent APIs
1.110 + // Internal methods used only inside ECOM , not for client use.
1.111 +
1.112 + static CImplementationInformation* NewLC(TBool aClientSide,
1.113 + RReadStream& aStream);
1.114 +
1.115 + static CImplementationInformation* NewL(TUid aUid,
1.116 + TInt aVersion,
1.117 HBufC* aName,
1.118 HBufC8* aDataType,
1.119 HBufC8* aOpaqueData,
1.120 TDriveUnit aDrive,
1.121 TBool aRomOnly,
1.122 TBool aRomBased);
1.123 + static CImplementationInformation* NewL(TUid aUid,
1.124 + TInt aVersion,
1.125 + HBufC* aName,
1.126 + HBufC8* aDataType,
1.127 + HBufC8* aOpaqueData,
1.128 + TDriveUnit aDrive,
1.129 + TBool aRomOnly,
1.130 + TBool aRomBased,
1.131 + RExtendedInterfacesArray* aExtendedInterfaces);
1.132
1.133 ~CImplementationInformation();
1.134 +
1.135 +public: // publishedAll APIs
1.136 + // Available for use by all clients
1.137 +
1.138 + inline const TDesC& DisplayName() const;
1.139 +
1.140 + inline const TDesC8& DataType() const;
1.141 + inline const TDesC8& OpaqueData() const;
1.142 +
1.143 + inline TUid ImplementationUid() const;
1.144 + inline TInt Version() const;
1.145 +
1.146 + inline TDriveUnit Drive() const;
1.147
1.148 - inline const TDesC& DisplayName() const;
1.149 + inline TBool RomOnly() const;
1.150 + inline TBool RomBased() const;
1.151
1.152 - inline const TDesC8& DataType() const;
1.153 -
1.154 - inline const TDesC8& OpaqueData() const;
1.155 -
1.156 - inline TUid ImplementationUid() const;
1.157 -
1.158 - inline TInt Version() const;
1.159 + inline TVendorId VendorId() const;
1.160
1.161 inline TBool Disabled() const;
1.162
1.163 - //This function should not be used by any ECOM client as it will have no effect
1.164 - //at all on the implementation information stored in the server side.
1.165 + // This function should not be used by any ECOM client as it will have no
1.166 + // effect at all on the implementation information stored in the server side
1.167 inline void SetDisabled(TBool aDisabled);
1.168 +
1.169 + IMPORT_C void GetExtendedInterfaceListL(RExtendedInterfacesArray& aList);
1.170 +
1.171 +public: // internalComponent APIs
1.172 + // Internal methods used inside ECOM, not for client use.
1.173 +
1.174 + void ExternalizeL(TBool aClientSide,RWriteStream& aStream) const;
1.175 + void InternalizeL(TBool aClientSide,RReadStream& aStream);
1.176
1.177 - void ExternalizeL(TBool aClientSide,RWriteStream& aStream) const;
1.178 -
1.179 - void InternalizeL(TBool aClientSide,RReadStream& aStream);
1.180 - inline TDriveUnit Drive() const;
1.181 - inline TBool RomOnly() const;
1.182 - inline TBool RomBased() const;
1.183 void SetRomBased(TBool aRomBased);
1.184 - inline TVendorId VendorId() const;
1.185 void SetDrive(TDriveUnit aDrive);
1.186
1.187 -public:
1.188 - // The following function is categorised as @internalComponent
1.189 - //and should not be used by ECOM clients.
1.190 inline void SetVendorId(const TVendorId aVid);
1.191 -
1.192 -private:
1.193 +
1.194 + void AddExtendedInterfaceL(const TUid& aExtendedInterface);
1.195 + RExtendedInterfacesArray* GetExtendedInterfaceList();
1.196
1.197 +private: // internalComponent APIs
1.198 + // Internal methods used inside ECOM, not for client use.
1.199 +
1.200 CImplementationInformation();
1.201 -
1.202 - CImplementationInformation(TUid aUid,
1.203 - TInt aVersion,
1.204 - HBufC* aName,
1.205 +
1.206 + CImplementationInformation(TUid aUid,
1.207 + TInt aVersion,
1.208 + HBufC* aName,
1.209 HBufC8* aDataType,
1.210 HBufC8* aOpaqueData,
1.211 TDriveUnit aDrive,
1.212 TBool aRomOnly,
1.213 TBool aRomBased);
1.214 -
1.215 +
1.216 + CImplementationInformation(TUid aUid,
1.217 + TInt aVersion,
1.218 + HBufC* aName,
1.219 + HBufC8* aDataType,
1.220 + HBufC8* aOpaqueData,
1.221 + TDriveUnit aDrive,
1.222 + TBool aRomOnly,
1.223 + TBool aRomBased,
1.224 + RExtendedInterfacesArray* aExtendedInterfaces);
1.225 +
1.226 private:
1.227 /** The implementation UID */
1.228 + TUid iImplementationUid;
1.229
1.230 - TUid iImplementationUid;
1.231 /** The implementation version */
1.232 + TInt iVersion;
1.233
1.234 - TInt iVersion;
1.235 - /** This implementations human readable name intended for display in UI implementations */
1.236 + /** This implementations human readable name intended for display in
1.237 + UI implementations */
1.238 + HBufC* iDisplayName;
1.239
1.240 - HBufC* iDisplayName;
1.241 - /**
1.242 - The type of data this implementation is registered to handle :
1.243 - Used for matching against the run-time cue provided by the client
1.244 - during default interface implementation resolution.
1.245 + /** The type of data this implementation is registered to handle :
1.246 + Used for matching against the run-time cue provided by the client
1.247 + during default interface implementation resolution.
1.248 */
1.249 + HBufC8* iData;
1.250
1.251 - HBufC8* iData;
1.252 - /**
1.253 - Data registered for this implementation which can be used by the client
1.254 - during non-default resolution operations but is ignored by the framework.
1.255 + /** Data registered for this implementation which can be used by the client
1.256 + during non-default resolution operations but is ignored by the framework.
1.257 */
1.258 + HBufC8* iOpaqueData;
1.259
1.260 - HBufC8* iOpaqueData;
1.261 - /** The flag recording if this implementation is disabled or enabled */
1.262 + /** The flag recording if this implementation is disabled or enabled */
1.263 + TBool iDisabled;
1.264
1.265 - TBool iDisabled;
1.266 - /** The drive that this plug-in resides on */
1.267 + /** The drive that this plug-in resides on */
1.268 TDriveUnit iDrive;
1.269 - /** The flag recording whether this implementation may only be loaded
1.270 +
1.271 + /** The flag recording whether this implementation may only be loaded
1.272 from read-only internal media */
1.273 TBool iRomOnly;
1.274 - /** This flag records whether this implementation was discovered on
1.275 +
1.276 + /** This flag records whether this implementation was discovered on
1.277 read-only internal media or that it is a later version of one that was */
1.278 TBool iRomBased;
1.279 +
1.280 /** The Vendor ID of the plug-in which this implementation belongs to*/
1.281 TVendorId iVid;
1.282 +
1.283 + /** Array of extended interfaces.*/
1.284 + RExtendedInterfacesArray* iExtendedInterfaceList;
1.285 +
1.286 }; // End CImplementationInformation
1.287
1.288 -/**
1.289 -Simplifies the definition of functions which return registry information
1.290
1.291 -@publishedAll
1.292 -@released
1.293 +// ____________________________________________________________________________
1.294 +// TYPES
1.295 +
1.296 +/**
1.297 +Simplifies the definition of functions which return registry information
1.298 */
1.299 typedef RArray<CImplementationInformation*> RImplInfoArray;
1.300
1.301 -/**
1.302 -Simplifies the definition of functions which return registry information
1.303 -
1.304 -@publishedAll
1.305 -@released
1.306 +/**
1.307 +Simplifies the definition of functions which return registry information
1.308 */
1.309 typedef RPointerArray<CImplementationInformation> RImplInfoPtrArray;
1.310
1.311
1.312 +// ____________________________________________________________________________
1.313 +// INLINES
1.314 +
1.315 #include <ecom/implementationinformation.inl>
1.316
1.317 +
1.318 #endif // __IMPLEMENTATIONINFORMATION_H__