epoc32/include/ecom/implementationinformation.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // This file contains the definition of the CImplementationInformation API class.
    15 // 
    16 //
    17 
    18 /**
    19  @file
    20  @publishedAll
    21  @released
    22 */
    23 
    24 #ifndef __IMPLEMENTATIONINFORMATION_H__
    25 #define __IMPLEMENTATIONINFORMATION_H__
    26 
    27 // ____________________________________________________________________________
    28 // INCLUDES
    29 
    30 #include <s32std.h>
    31 #include <f32file.h>
    32 
    33 
    34 // ____________________________________________________________________________
    35 // TYPES
    36 
    37 /**
    38 Simplifies the definition of extended interfaces array
    39 @publishedPartner
    40 @released
    41 */
    42 // To be used internally by ECOM and by Phone Manufacturers
    43 typedef RArray<TUid> RExtendedInterfacesArray;
    44 
    45 
    46 
    47 // ____________________________________________________________________________
    48 // CLASSES
    49 
    50 /**
    51 The CimplementationInformation class acts as the container for the registration 
    52 data relating to a particular interface implementation.
    53 Note that this class is used in both the ECOM client and server side hence the 
    54 mixed API classification seen below. For the client side only the API used to 
    55 extract the registration data should be used.
    56 */
    57 NONSHARABLE_CLASS(CImplementationInformation) : public CBase
    58 	{
    59 public: // internalComponent APIs
    60     	// Internal methods used only inside ECOM , not for client use.
    61 
    62 	static CImplementationInformation* NewLC(TBool aClientSide,
    63                                              RReadStream& aStream);
    64 
    65 	static CImplementationInformation* NewL(TUid	aUid,
    66 											TInt	aVersion,
    67 											HBufC*  aName,
    68 											HBufC8* aDataType,
    69 											HBufC8* aOpaqueData,
    70 											TDriveUnit aDrive,
    71 											TBool aRomOnly,
    72 											TBool aRomBased);
    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 											RExtendedInterfacesArray* aExtendedInterfaces);
    82 	
    83 	~CImplementationInformation();
    84 
    85 public: // publishedAll APIs
    86         // Available for use by all clients
    87 
    88 	inline const TDesC& DisplayName() const;
    89 
    90 	inline const TDesC8& DataType() const;
    91 	inline const TDesC8& OpaqueData() const;
    92 
    93 	inline TUid ImplementationUid() const;
    94 	inline TInt Version() const;
    95 
    96 	inline TDriveUnit Drive() const;
    97 	
    98 	inline TBool RomOnly() const;
    99 	inline TBool RomBased() const;
   100 	
   101 	inline TVendorId VendorId() const;
   102 	
   103 	inline TBool Disabled() const;
   104 	
   105 	// This function should not be used by any ECOM client as it will have no 
   106     // effect at all on the implementation information stored in the server side
   107 	inline void SetDisabled(TBool aDisabled);
   108 
   109 	IMPORT_C void GetExtendedInterfaceListL(RExtendedInterfacesArray& aList);
   110 
   111 public: // internalComponent APIs
   112     	// Internal methods used inside ECOM, not for client use.
   113 
   114 	void ExternalizeL(TBool aClientSide,RWriteStream& aStream) const;
   115 	void InternalizeL(TBool aClientSide,RReadStream& aStream);
   116 	
   117 	void SetRomBased(TBool aRomBased);
   118 	void SetDrive(TDriveUnit aDrive);
   119 	
   120  	inline void SetVendorId(const TVendorId aVid);
   121 
   122 	void AddExtendedInterfaceL(const TUid& aExtendedInterface); 	
   123 	RExtendedInterfacesArray* GetExtendedInterfaceList();
   124 	
   125 private: // internalComponent APIs
   126          // Internal methods used inside ECOM, not for client use.
   127 
   128 	CImplementationInformation();
   129 
   130 	CImplementationInformation(TUid aUid,
   131 							   TInt aVersion,
   132 							   HBufC*  aName,
   133 							   HBufC8* aDataType,
   134 							   HBufC8* aOpaqueData,
   135 							   TDriveUnit aDrive,
   136 							   TBool aRomOnly,
   137 							   TBool aRomBased);
   138     
   139     CImplementationInformation(TUid aUid,
   140 							   TInt aVersion,
   141 							   HBufC*  aName,
   142 							   HBufC8* aDataType,
   143 							   HBufC8* aOpaqueData,
   144 							   TDriveUnit aDrive,
   145 							   TBool aRomOnly,
   146 							   TBool aRomBased,
   147 							   RExtendedInterfacesArray* aExtendedInterfaces);
   148 							   	
   149 private:
   150 	/** The implementation UID */
   151 	TUid		iImplementationUid;
   152 	
   153 	/** The implementation version */
   154 	TInt		iVersion;
   155 	
   156 	/** This implementations human readable name intended for display in 
   157 	    UI implementations */
   158 	HBufC*		iDisplayName;
   159 	
   160 	/** The type of data this implementation is registered to handle :
   161 	Used for matching against the run-time cue provided by the client
   162 	during default interface implementation resolution.
   163 	*/
   164 	HBufC8*		iData;
   165 	
   166 	/** Data registered for this implementation which can be used by the client
   167 	during non-default resolution operations but is ignored by the framework.
   168 	*/
   169 	HBufC8*		iOpaqueData;
   170 	
   171 	/** The flag recording if this implementation is disabled or enabled */
   172 	TBool		iDisabled;
   173 	
   174 	/** The drive that this plug-in resides on */
   175 	TDriveUnit		iDrive;
   176 	
   177 	/** The flag recording whether this implementation may only be loaded
   178 	from read-only internal media */
   179 	TBool iRomOnly;
   180 	
   181 	/** This flag records whether this implementation was discovered on
   182 	read-only internal media or that it is a later version of one that was */
   183 	TBool iRomBased;
   184 	
   185 	/** The Vendor ID of the plug-in which this implementation belongs to*/
   186 	TVendorId iVid;
   187 	
   188 	/** Array of extended interfaces.*/
   189 	RExtendedInterfacesArray* iExtendedInterfaceList;
   190 	
   191 	};	// End CImplementationInformation
   192 
   193 
   194 // ____________________________________________________________________________
   195 // TYPES
   196 
   197 /**
   198 Simplifies the definition of functions which return registry information
   199 */
   200 typedef RArray<CImplementationInformation*> RImplInfoArray;
   201 
   202 /**
   203 Simplifies the definition of functions which return registry information
   204 */
   205 typedef RPointerArray<CImplementationInformation> RImplInfoPtrArray;
   206 
   207 
   208 // ____________________________________________________________________________
   209 // INLINES
   210 
   211 #include <ecom/implementationinformation.inl>
   212 
   213 
   214 #endif		// __IMPLEMENTATIONINFORMATION_H__