epoc32/include/ecom/implementationinformation.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
     1.1 --- a/epoc32/include/ecom/implementationinformation.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/ecom/implementationinformation.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,185 @@
     1.4 -implementationinformation.h
     1.5 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +// All rights reserved.
     1.7 +// This component and the accompanying materials are made available
     1.8 +// 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.9 +// which accompanies this distribution, and is available
    1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +//
    1.12 +// Initial Contributors:
    1.13 +// Nokia Corporation - initial contribution.
    1.14 +//
    1.15 +// Contributors:
    1.16 +//
    1.17 +// Description:
    1.18 +// This file contains the definition of
    1.19 +// the CImplementationInformation class.
    1.20 +// 
    1.21 +//
    1.22 +
    1.23 +
    1.24 +
    1.25 +#ifndef __IMPLEMENTATIONINFORMATION_H__
    1.26 +#define __IMPLEMENTATIONINFORMATION_H__
    1.27 +
    1.28 +#include <s32std.h>
    1.29 +#include <f32file.h>
    1.30 +
    1.31 +// ____________________________________________________________________________________
    1.32 +// 
    1.33 +/**
    1.34 +CImplementationInformation
    1.35 +
    1.36 +This class acts as the container for the registration data 
    1.37 +relating to a particular Interface Implementation.
    1.38 +Note that this class is used in both the ECOM client and server side,
    1.39 +For the client side only the API used to extract the registration data
    1.40 +should be used.
    1.41 +	
    1.42 +It is available to the client to allow access to the
    1.43 +registered characteristics of the implementation.
    1.44 +These characteristics are:
    1.45 +
    1.46 +ImplementationUid() The Uid of this implementation.
    1.47 +
    1.48 +Version()			The version number of this implementation.
    1.49 +
    1.50 +DisplayName()		The human readable name for this implementation returned 
    1.51 +					as a 16 bit descriptor.
    1.52 +
    1.53 +DataType()			The data type which this implementation supports, returned
    1.54 +					as an 8 bit descriptor.
    1.55 +
    1.56 +OpaqueData()		The opaque data which is registered for this implementation,
    1.57 +					returned as an 8 bit descriptor.
    1.58 +
    1.59 +RomOnly()			The flag indicating whether this implementation is to be loaded
    1.60 +					from ROM only.
    1.61 +
    1.62 +RomBased()			The flag recording whether this implementation is on ROM or is
    1.63 +					a later version of one on ROM.
    1.64 +					
    1.65 +VendorId()  		The Vendor ID of the plug-in which this implementation belongs to
    1.66 +
    1.67 +@publishedAll
    1.68 +@released
    1.69 +*/
    1.70 +
    1.71 +NONSHARABLE_CLASS(CImplementationInformation) : public CBase
    1.72 +	{
    1.73 +public:
    1.74 +	
    1.75 +	static CImplementationInformation* NewLC(TBool aClientSide,RReadStream& aStream);
    1.76 +	
    1.77 +	static CImplementationInformation* NewL(TUid	aUid, 
    1.78 +											TInt	aVersion, 
    1.79 +											HBufC*  aName,
    1.80 +											HBufC8* aDataType,
    1.81 +											HBufC8* aOpaqueData,
    1.82 +											TDriveUnit aDrive,
    1.83 +											TBool aRomOnly,
    1.84 +											TBool aRomBased);
    1.85 +	
    1.86 +	~CImplementationInformation();
    1.87 +	
    1.88 +	inline const TDesC& DisplayName() const;
    1.89 +	
    1.90 +	inline const TDesC8& DataType() const;
    1.91 +	
    1.92 +	inline const TDesC8& OpaqueData() const;
    1.93 +	
    1.94 +	inline TUid ImplementationUid() const;
    1.95 +	
    1.96 +	inline TInt Version() const;
    1.97 +	
    1.98 +	inline TBool Disabled() const;
    1.99 +	
   1.100 +	//This function should not be used by any ECOM client as it will have no effect 
   1.101 +	//at all on the implementation information stored in the server side.
   1.102 +	inline void SetDisabled(TBool aDisabled);
   1.103 +	
   1.104 +	void ExternalizeL(TBool aClientSide,RWriteStream& aStream) const;
   1.105 +	
   1.106 +	void InternalizeL(TBool aClientSide,RReadStream& aStream);
   1.107 +	inline TDriveUnit Drive() const;
   1.108 +	inline TBool RomOnly() const;
   1.109 +	inline TBool RomBased() const;
   1.110 +	void SetRomBased(TBool aRomBased);
   1.111 +	inline TVendorId VendorId() const;
   1.112 +	void SetDrive(TDriveUnit aDrive);
   1.113 +	
   1.114 +public:
   1.115 +	// The following function is categorised as @internalComponent 
   1.116 +	//and should not be used by ECOM clients.
   1.117 + 	inline void SetVendorId(const TVendorId aVid);
   1.118 + 	
   1.119 +private:
   1.120 +	
   1.121 +	CImplementationInformation();
   1.122 +	
   1.123 +	CImplementationInformation(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 +
   1.132 +private:
   1.133 +	/** The implementation UID */
   1.134 +	
   1.135 +	TUid		iImplementationUid;
   1.136 +	/** The implementation version */
   1.137 +	
   1.138 +	TInt		iVersion;
   1.139 +	/** This implementations human readable name intended for display in UI implementations */
   1.140 +	
   1.141 +	HBufC*		iDisplayName;
   1.142 +	/** 
   1.143 +		The type of data this implementation is registered to handle : 
   1.144 +		Used for matching against the run-time cue provided by the client
   1.145 +		during default interface implementation resolution.
   1.146 +	*/
   1.147 +	
   1.148 +	HBufC8*		iData;
   1.149 +	/** 
   1.150 +		Data registered for this implementation which can be used by the client
   1.151 +		during non-default resolution operations but is ignored by the framework. 
   1.152 +	*/
   1.153 +	
   1.154 +	HBufC8*		iOpaqueData;
   1.155 +	/** The flag recording if this implementation is disabled or enabled */ 
   1.156 +	
   1.157 +	TBool		iDisabled;
   1.158 +	/** The drive that this plug-in resides on */ 
   1.159 +	TDriveUnit		iDrive;
   1.160 +	/** The flag recording whether this implementation may only be loaded 
   1.161 +	from read-only internal media */
   1.162 +	TBool iRomOnly;
   1.163 +	/** This flag records whether this implementation was discovered on 
   1.164 +	read-only internal media or that it is a later version of one that was */
   1.165 +	TBool iRomBased;
   1.166 +	/** The Vendor ID of the plug-in which this implementation belongs to*/
   1.167 +	TVendorId iVid;
   1.168 +	};	// End CImplementationInformation
   1.169 +
   1.170 +/** 
   1.171 +Simplifies the definition of functions which return registry information 
   1.172 +
   1.173 +@publishedAll
   1.174 +@released
   1.175 +*/
   1.176 +typedef RArray<CImplementationInformation*> RImplInfoArray;
   1.177 +
   1.178 +/** 
   1.179 +Simplifies the definition of functions which return registry information 
   1.180 +
   1.181 +@publishedAll
   1.182 +@released
   1.183 +*/
   1.184 +typedef RPointerArray<CImplementationInformation> RImplInfoPtrArray;
   1.185 +
   1.186 +
   1.187 +#include <ecom/implementationinformation.inl>
   1.188 +
   1.189 +#endif		// __IMPLEMENTATIONINFORMATION_H__