epoc32/include/ecom/implementationinformation.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 implementationinformation.h
     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".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // This file contains the definition of
       
    15 // the CImplementationInformation class.
       
    16 // 
       
    17 //
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __IMPLEMENTATIONINFORMATION_H__
       
    22 #define __IMPLEMENTATIONINFORMATION_H__
       
    23 
       
    24 #include <s32std.h>
       
    25 #include <f32file.h>
       
    26 
       
    27 // ____________________________________________________________________________________
       
    28 // 
       
    29 /**
       
    30 CImplementationInformation
       
    31 
       
    32 This class acts as the container for the registration data 
       
    33 relating to a particular Interface Implementation.
       
    34 Note that this class is used in both the ECOM client and server side,
       
    35 For the client side only the API used to extract the registration data
       
    36 should be used.
       
    37 	
       
    38 It is available to the client to allow access to the
       
    39 registered characteristics of the implementation.
       
    40 These characteristics are:
       
    41 
       
    42 ImplementationUid() The Uid of this implementation.
       
    43 
       
    44 Version()			The version number of this implementation.
       
    45 
       
    46 DisplayName()		The human readable name for this implementation returned 
       
    47 					as a 16 bit descriptor.
       
    48 
       
    49 DataType()			The data type which this implementation supports, returned
       
    50 					as an 8 bit descriptor.
       
    51 
       
    52 OpaqueData()		The opaque data which is registered for this implementation,
       
    53 					returned as an 8 bit descriptor.
       
    54 
       
    55 RomOnly()			The flag indicating whether this implementation is to be loaded
       
    56 					from ROM only.
       
    57 
       
    58 RomBased()			The flag recording whether this implementation is on ROM or is
       
    59 					a later version of one on ROM.
       
    60 					
       
    61 VendorId()  		The Vendor ID of the plug-in which this implementation belongs to
       
    62 
       
    63 @publishedAll
       
    64 @released
       
    65 */
       
    66 
       
    67 NONSHARABLE_CLASS(CImplementationInformation) : public CBase
       
    68 	{
       
    69 public:
       
    70 	
       
    71 	static CImplementationInformation* NewLC(TBool aClientSide,RReadStream& aStream);
       
    72 	
       
    73 	static CImplementationInformation* NewL(TUid	aUid, 
       
    74 											TInt	aVersion, 
       
    75 											HBufC*  aName,
       
    76 											HBufC8* aDataType,
       
    77 											HBufC8* aOpaqueData,
       
    78 											TDriveUnit aDrive,
       
    79 											TBool aRomOnly,
       
    80 											TBool aRomBased);
       
    81 	
       
    82 	~CImplementationInformation();
       
    83 	
       
    84 	inline const TDesC& DisplayName() const;
       
    85 	
       
    86 	inline const TDesC8& DataType() const;
       
    87 	
       
    88 	inline const TDesC8& OpaqueData() const;
       
    89 	
       
    90 	inline TUid ImplementationUid() const;
       
    91 	
       
    92 	inline TInt Version() const;
       
    93 	
       
    94 	inline TBool Disabled() const;
       
    95 	
       
    96 	//This function should not be used by any ECOM client as it will have no effect 
       
    97 	//at all on the implementation information stored in the server side.
       
    98 	inline void SetDisabled(TBool aDisabled);
       
    99 	
       
   100 	void ExternalizeL(TBool aClientSide,RWriteStream& aStream) const;
       
   101 	
       
   102 	void InternalizeL(TBool aClientSide,RReadStream& aStream);
       
   103 	inline TDriveUnit Drive() const;
       
   104 	inline TBool RomOnly() const;
       
   105 	inline TBool RomBased() const;
       
   106 	void SetRomBased(TBool aRomBased);
       
   107 	inline TVendorId VendorId() const;
       
   108 	void SetDrive(TDriveUnit aDrive);
       
   109 	
       
   110 public:
       
   111 	// The following function is categorised as @internalComponent 
       
   112 	//and should not be used by ECOM clients.
       
   113  	inline void SetVendorId(const TVendorId aVid);
       
   114  	
       
   115 private:
       
   116 	
       
   117 	CImplementationInformation();
       
   118 	
       
   119 	CImplementationInformation(TUid aUid, 
       
   120 							   TInt aVersion, 
       
   121 							   HBufC*  aName, 
       
   122 							   HBufC8* aDataType,
       
   123 							   HBufC8* aOpaqueData,
       
   124 							   TDriveUnit aDrive,
       
   125 							   TBool aRomOnly,
       
   126 							   TBool aRomBased);
       
   127 
       
   128 private:
       
   129 	/** The implementation UID */
       
   130 	
       
   131 	TUid		iImplementationUid;
       
   132 	/** The implementation version */
       
   133 	
       
   134 	TInt		iVersion;
       
   135 	/** This implementations human readable name intended for display in UI implementations */
       
   136 	
       
   137 	HBufC*		iDisplayName;
       
   138 	/** 
       
   139 		The type of data this implementation is registered to handle : 
       
   140 		Used for matching against the run-time cue provided by the client
       
   141 		during default interface implementation resolution.
       
   142 	*/
       
   143 	
       
   144 	HBufC8*		iData;
       
   145 	/** 
       
   146 		Data registered for this implementation which can be used by the client
       
   147 		during non-default resolution operations but is ignored by the framework. 
       
   148 	*/
       
   149 	
       
   150 	HBufC8*		iOpaqueData;
       
   151 	/** The flag recording if this implementation is disabled or enabled */ 
       
   152 	
       
   153 	TBool		iDisabled;
       
   154 	/** The drive that this plug-in resides on */ 
       
   155 	TDriveUnit		iDrive;
       
   156 	/** The flag recording whether this implementation may only be loaded 
       
   157 	from read-only internal media */
       
   158 	TBool iRomOnly;
       
   159 	/** This flag records whether this implementation was discovered on 
       
   160 	read-only internal media or that it is a later version of one that was */
       
   161 	TBool iRomBased;
       
   162 	/** The Vendor ID of the plug-in which this implementation belongs to*/
       
   163 	TVendorId iVid;
       
   164 	};	// End CImplementationInformation
       
   165 
       
   166 /** 
       
   167 Simplifies the definition of functions which return registry information 
       
   168 
       
   169 @publishedAll
       
   170 @released
       
   171 */
       
   172 typedef RArray<CImplementationInformation*> RImplInfoArray;
       
   173 
       
   174 /** 
       
   175 Simplifies the definition of functions which return registry information 
       
   176 
       
   177 @publishedAll
       
   178 @released
       
   179 */
       
   180 typedef RPointerArray<CImplementationInformation> RImplInfoPtrArray;
       
   181 
       
   182 
       
   183 #include <ecom/implementationinformation.inl>
       
   184 
       
   185 #endif		// __IMPLEMENTATIONINFORMATION_H__