williamr@2: // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // 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: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // This file contains the definition of williamr@2: // the CImplementationInformation class. williamr@2: // williamr@2: // williamr@2: williamr@2: williamr@2: williamr@2: #ifndef __IMPLEMENTATIONINFORMATION_H__ williamr@2: #define __IMPLEMENTATIONINFORMATION_H__ williamr@2: williamr@2: #include williamr@2: #include williamr@2: williamr@2: // ____________________________________________________________________________________ williamr@2: // williamr@2: /** williamr@2: CImplementationInformation williamr@2: williamr@2: This class acts as the container for the registration data williamr@2: relating to a particular Interface Implementation. williamr@2: Note that this class is used in both the ECOM client and server side, williamr@2: For the client side only the API used to extract the registration data williamr@2: should be used. williamr@2: williamr@2: It is available to the client to allow access to the williamr@2: registered characteristics of the implementation. williamr@2: These characteristics are: williamr@2: williamr@2: ImplementationUid() The Uid of this implementation. williamr@2: williamr@2: Version() The version number of this implementation. williamr@2: williamr@2: DisplayName() The human readable name for this implementation returned williamr@2: as a 16 bit descriptor. williamr@2: williamr@2: DataType() The data type which this implementation supports, returned williamr@2: as an 8 bit descriptor. williamr@2: williamr@2: OpaqueData() The opaque data which is registered for this implementation, williamr@2: returned as an 8 bit descriptor. williamr@2: williamr@2: RomOnly() The flag indicating whether this implementation is to be loaded williamr@2: from ROM only. williamr@2: williamr@2: RomBased() The flag recording whether this implementation is on ROM or is williamr@2: a later version of one on ROM. williamr@2: williamr@2: VendorId() The Vendor ID of the plug-in which this implementation belongs to williamr@2: williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: williamr@2: NONSHARABLE_CLASS(CImplementationInformation) : public CBase williamr@2: { williamr@2: public: williamr@2: williamr@2: static CImplementationInformation* NewLC(TBool aClientSide,RReadStream& aStream); williamr@2: williamr@2: static CImplementationInformation* NewL(TUid aUid, williamr@2: TInt aVersion, williamr@2: HBufC* aName, williamr@2: HBufC8* aDataType, williamr@2: HBufC8* aOpaqueData, williamr@2: TDriveUnit aDrive, williamr@2: TBool aRomOnly, williamr@2: TBool aRomBased); williamr@2: williamr@2: ~CImplementationInformation(); williamr@2: williamr@2: inline const TDesC& DisplayName() const; williamr@2: williamr@2: inline const TDesC8& DataType() const; williamr@2: williamr@2: inline const TDesC8& OpaqueData() const; williamr@2: williamr@2: inline TUid ImplementationUid() const; williamr@2: williamr@2: inline TInt Version() const; williamr@2: williamr@2: inline TBool Disabled() const; williamr@2: williamr@2: //This function should not be used by any ECOM client as it will have no effect williamr@2: //at all on the implementation information stored in the server side. williamr@2: inline void SetDisabled(TBool aDisabled); williamr@2: williamr@2: void ExternalizeL(TBool aClientSide,RWriteStream& aStream) const; williamr@2: williamr@2: void InternalizeL(TBool aClientSide,RReadStream& aStream); williamr@2: inline TDriveUnit Drive() const; williamr@2: inline TBool RomOnly() const; williamr@2: inline TBool RomBased() const; williamr@2: void SetRomBased(TBool aRomBased); williamr@2: inline TVendorId VendorId() const; williamr@2: void SetDrive(TDriveUnit aDrive); williamr@2: williamr@2: public: williamr@2: // The following function is categorised as @internalComponent williamr@2: //and should not be used by ECOM clients. williamr@2: inline void SetVendorId(const TVendorId aVid); williamr@2: williamr@2: private: williamr@2: williamr@2: CImplementationInformation(); williamr@2: williamr@2: CImplementationInformation(TUid aUid, williamr@2: TInt aVersion, williamr@2: HBufC* aName, williamr@2: HBufC8* aDataType, williamr@2: HBufC8* aOpaqueData, williamr@2: TDriveUnit aDrive, williamr@2: TBool aRomOnly, williamr@2: TBool aRomBased); williamr@2: williamr@2: private: williamr@2: /** The implementation UID */ williamr@2: williamr@2: TUid iImplementationUid; williamr@2: /** The implementation version */ williamr@2: williamr@2: TInt iVersion; williamr@2: /** This implementations human readable name intended for display in UI implementations */ williamr@2: williamr@2: HBufC* iDisplayName; williamr@2: /** williamr@2: The type of data this implementation is registered to handle : williamr@2: Used for matching against the run-time cue provided by the client williamr@2: during default interface implementation resolution. williamr@2: */ williamr@2: williamr@2: HBufC8* iData; williamr@2: /** williamr@2: Data registered for this implementation which can be used by the client williamr@2: during non-default resolution operations but is ignored by the framework. williamr@2: */ williamr@2: williamr@2: HBufC8* iOpaqueData; williamr@2: /** The flag recording if this implementation is disabled or enabled */ williamr@2: williamr@2: TBool iDisabled; williamr@2: /** The drive that this plug-in resides on */ williamr@2: TDriveUnit iDrive; williamr@2: /** The flag recording whether this implementation may only be loaded williamr@2: from read-only internal media */ williamr@2: TBool iRomOnly; williamr@2: /** This flag records whether this implementation was discovered on williamr@2: read-only internal media or that it is a later version of one that was */ williamr@2: TBool iRomBased; williamr@2: /** The Vendor ID of the plug-in which this implementation belongs to*/ williamr@2: TVendorId iVid; williamr@2: }; // End CImplementationInformation williamr@2: williamr@2: /** williamr@2: Simplifies the definition of functions which return registry information williamr@2: williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: typedef RArray RImplInfoArray; williamr@2: williamr@2: /** williamr@2: Simplifies the definition of functions which return registry information williamr@2: williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: typedef RPointerArray RImplInfoPtrArray; williamr@2: williamr@2: williamr@2: #include williamr@2: williamr@2: #endif // __IMPLEMENTATIONINFORMATION_H__