epoc32/include/mmf/common/mmfcontrollerpluginresolver.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
     1.1 --- a/epoc32/include/mmf/common/mmfcontrollerpluginresolver.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/mmf/common/mmfcontrollerpluginresolver.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,1465 @@
     1.4 -mmfcontrollerpluginresolver.h
     1.5 +// Copyright (c) 2002-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 +// mmf\common\mmfcontrollerpluginresolver.h
    1.19 +// 
    1.20 +//
    1.21 +
    1.22 +#ifndef MMF_COMMON_MMFCONTROLLERPLUGINRESOLVER_H
    1.23 +#define MMF_COMMON_MMFCONTROLLERPLUGINRESOLVER_H
    1.24 +
    1.25 +#include <ecom/ecom.h>
    1.26 +#include <e32base.h>
    1.27 +#include <apmstd.h>
    1.28 +
    1.29 +/**
    1.30 +@publishedAll
    1.31 +@released
    1.32 +
    1.33 +Default heap size for the controller thread
    1.34 +*/
    1.35 +const TUint KMMFDefaultControllerThreadHeapSize = 0x100000; //1MB
    1.36 +
    1.37 +
    1.38 +class CMMFFormatImplementationInformation;
    1.39 +
    1.40 +/**
    1.41 +@publishedAll
    1.42 +@released
    1.43 +
    1.44 +Array of CMMFFormatImplementationInformation 
    1.45 +*/
    1.46 +typedef RPointerArray<CMMFFormatImplementationInformation> RMMFFormatImplInfoArray;
    1.47 +
    1.48 +class CMMFControllerImplementationInformation;
    1.49 +
    1.50 +/**
    1.51 +@publishedAll
    1.52 +@released
    1.53 +
    1.54 +Array of CMMFControllerImplementationInformation 
    1.55 +*/
    1.56 +typedef RPointerArray<CMMFControllerImplementationInformation> RMMFControllerImplInfoArray;
    1.57 +
    1.58 +/**
    1.59 +@internalComponent
    1.60 +
    1.61 +Interface to be implemented by customers of the class TaggedDataParser.
    1.62 +*/
    1.63 +class MTaggedDataParserClient
    1.64 +	{
    1.65 +public:
    1.66 +	virtual void ProcessTaggedDataL(const TDesC8& aTag, const TDesC8& aData) = 0;
    1.67 +	};
    1.68 +
    1.69 +/**
    1.70 +@internalComponent
    1.71 +
    1.72 +Utility class used to parse data separated by xml-style tags.
    1.73 +*/
    1.74 +class TaggedDataParser
    1.75 +	{
    1.76 +public:
    1.77 +
    1.78 +	/**
    1.79 +	Splits aData into xml-style tags and values, and gets aClient to process each tag/value pair.
    1.80 +	*/
    1.81 +	static void ParseTaggedDataL(const TDesC8& aData, MTaggedDataParserClient& aClient);
    1.82 +
    1.83 +	/**
    1.84 +	Converts a string to a uid. If the string begin with "0x" it will be parsed as Hex, else Decimal.
    1.85 +	*/
    1.86 +	static void ConvertTextToUidL(const TDesC8& aData, TUid& aUid);
    1.87 +
    1.88 +	/**
    1.89 +	Converts a string to a TUint. The string must begin with "0x" and be 10 characters long,
    1.90 +	otherwise it is considered corrupt.
    1.91 +	*/
    1.92 +	static void ConvertTextToTUintL(const TDesC8& aData, TUint& aUid);
    1.93 +
    1.94 +	};
    1.95 +
    1.96 +class CMatchData;
    1.97 +
    1.98 +class CDesC8Array;
    1.99 +
   1.100 +/**
   1.101 +@publishedAll
   1.102 +
   1.103 +Abstract class that contains basic information about ECom Multimedia plugins.
   1.104 +
   1.105 +@released
   1.106 +@since 7.0s
   1.107 +*/
   1.108 +class CMMFPluginImplementationInformation : public CBase
   1.109 +	{
   1.110 +public:
   1.111 +
   1.112 +	/**
   1.113 +	Returns the uid of this particular plugin implementation.
   1.114 +	This is the UID used to instantiate this multimedia plugin.
   1.115 +
   1.116 +	@return The implementation uid.
   1.117 +
   1.118 +	@since  7.0s
   1.119 +	*/
   1.120 +	IMPORT_C TUid Uid() const;
   1.121 +
   1.122 +	/**
   1.123 +	Returns the display name of this plugin implementation.
   1.124 +
   1.125 +	@return The display name.
   1.126 +
   1.127 +	@since  7.0s
   1.128 +	*/
   1.129 +	IMPORT_C const TDesC& DisplayName() const;
   1.130 +
   1.131 +	/**
   1.132 +	Returns the name of the supplier of this plugin implementation, e.g. "Symbian".
   1.133 +
   1.134 +	@return The plugin supplier.
   1.135 +
   1.136 +	@since  7.0s
   1.137 +	*/
   1.138 +	IMPORT_C const TDesC& Supplier() const;
   1.139 +
   1.140 +	/**
   1.141 +	Returns the version number of this plugin.
   1.142 +
   1.143 +	@return The version number.
   1.144 +
   1.145 +	@since 7.0s
   1.146 +	*/
   1.147 +	IMPORT_C TInt Version() const;
   1.148 +
   1.149 +	/**
   1.150 +	Returns the array of media IDs supported by this plugin.
   1.151 +	
   1.152 +	The media ID can be used by clients to determine whether the plugin supports audio or
   1.153 +	video data (or both). A UID is used for the media ID to provide future extensibility.
   1.154 +
   1.155 +	@return The array of media IDs.
   1.156 +
   1.157 +	@since  7.0s
   1.158 +	*/
   1.159 +	IMPORT_C const RArray<TUid>& SupportedMediaIds() const;
   1.160 +
   1.161 +	/**
   1.162 +	Tests whether this plugin was supplied by aSupplier.
   1.163 +
   1.164 +	@param  aSupplier
   1.165 +	        The required supplier.
   1.166 +
   1.167 +	@return A boolean indicating if this plugin was supplied by aSupplier. ETrue if this plugin was supplied 
   1.168 +	        by aSupplier, EFalse if not.
   1.169 +
   1.170 +	@since 7.0s
   1.171 +	*/
   1.172 +	IMPORT_C TBool SupportsSupplier(const TDesC& aSupplier) const;
   1.173 +
   1.174 +	/**
   1.175 +	Tests whether this plugin supports aMediaId.
   1.176 +
   1.177 +	@param  aMediaId
   1.178 +	        The required media id.
   1.179 +
   1.180 +	@return A boolean indicating if the plugin supports aMediaId. ETrue if this plugin supports aMediaId, EFalse if not.
   1.181 +
   1.182 +	@since 7.0s
   1.183 +	*/
   1.184 +	IMPORT_C TBool SupportsMediaId(TUid aMediaId) const;
   1.185 +
   1.186 +	/**
   1.187 +	Destructor.
   1.188 +	*/
   1.189 +	virtual ~CMMFPluginImplementationInformation();
   1.190 +
   1.191 +protected:
   1.192 +
   1.193 +	/**
   1.194 +	Constructor.
   1.195 +	*/
   1.196 +	CMMFPluginImplementationInformation();
   1.197 +
   1.198 +	/** 
   1.199 +	Sets the supplier. Takes a copy of aData.
   1.200 +	*/
   1.201 +	void SetSupplierL(const TDesC8& aData);
   1.202 +
   1.203 +	/**
   1.204 +	Adds a media id. aData is parsed to find the uid of the media id to be added.
   1.205 +	*/
   1.206 +	void AddMediaIdL(const TDesC8& aData);
   1.207 +	
   1.208 +protected:
   1.209 +
   1.210 +	/** 
   1.211 +	The UID of this plugin. 
   1.212 +	*/
   1.213 +	TUid iUid;
   1.214 +
   1.215 +	/** 
   1.216 +	The display name of this plugin. 
   1.217 +	*/
   1.218 +	HBufC* iDisplayName;
   1.219 +
   1.220 +	/** 
   1.221 +	The supplier of this plugin. 
   1.222 +	*/
   1.223 +	HBufC* iSupplier;
   1.224 +
   1.225 +	/** 
   1.226 +	The version number of this plugin. 
   1.227 +	*/
   1.228 +	TInt iVersion;
   1.229 +
   1.230 +	/**
   1.231 +	The media ids supported by this plugin.
   1.232 +	*/
   1.233 +	RArray<TUid> iMediaIds;
   1.234 +	};
   1.235 +
   1.236 +/**
   1.237 +@publishedAll
   1.238 +@released
   1.239 +
   1.240 +Contains format support information retrieved from the ECom registry.
   1.241 +
   1.242 +An object of this type may describe either a concrete format plugin (ie a CMMFFormatEncode or a
   1.243 +CMMFFormatDecode implementation) or a format supported by a controller plugin.
   1.244 +
   1.245 +The object is created using a CImplementationInformation object retrieved from the ECom registry.
   1.246 +All relevant data is copied out of the CImplementationInformation object, and its opaque data is
   1.247 +parsed to provide the supplier, supported media ids, supported mime types, supported file extensions,
   1.248 +and supported header data matches.
   1.249 +
   1.250 +Notes for Format Plugin developers:
   1.251 +@code
   1.252 +The opaque data section of the ECom plugin resource file must be in the format:
   1.253 +
   1.254 +opaque_data = "<?>Data 1<?>Data 2<?>Data 3<?>Data 4[...]<?>Data N";
   1.255 +
   1.256 +The <?> preceding the data determines the meaning of the data.  The following are the possible tags:
   1.257 +
   1.258 +	<s> - Supplier
   1.259 +	<i> - Media Id
   1.260 +	<m> - Mime Type
   1.261 +	<e> - File Extension
   1.262 +	<h> - Header Data
   1.263 +	<c> - Custom Interfaces
   1.264 +
   1.265 +UIDs must always be in hex in the format '0x12345678', must include the '0x' and be 10 characters long
   1.266 +@endcode
   1.267 +
   1.268 +@since 7.0s
   1.269 +*/
   1.270 +class CMMFFormatImplementationInformation : public CMMFPluginImplementationInformation, MTaggedDataParserClient
   1.271 +	{
   1.272 +public:
   1.273 +	/**
   1.274 +	Constructs a new format implementation information object.
   1.275 +
   1.276 +	@param  aImplInfo
   1.277 +	        The ECOM implementation information
   1.278 +
   1.279 +	@return The new object created.
   1.280 +
   1.281 +	@since 7.0s
   1.282 +	*/
   1.283 +	static CMMFFormatImplementationInformation* NewL(const CImplementationInformation& aImplInfo);
   1.284 +
   1.285 +	/**
   1.286 +	Constructs a new format implementation information object.
   1.287 +
   1.288 +	@param  aImplInfo
   1.289 +	        The ECOM implementation information
   1.290 +
   1.291 +	@return The new object created. Note that this will be on the cleanup stack.
   1.292 +
   1.293 +	@since  7.0s
   1.294 +	*/
   1.295 +	static CMMFFormatImplementationInformation* NewLC(const CImplementationInformation& aImplInfo);
   1.296 +
   1.297 +	/** 
   1.298 +	Destructor 
   1.299 +	*/
   1.300 +	virtual ~CMMFFormatImplementationInformation();
   1.301 +
   1.302 +	/**
   1.303 +	Returns the array of supported file extensions.
   1.304 +
   1.305 +	@return The array of file extensions.
   1.306 +	@since  7.0s
   1.307 +	*/
   1.308 +	IMPORT_C const CDesC8Array& SupportedFileExtensions() const;
   1.309 +
   1.310 +	/**
   1.311 +	Returns the array of supported mime types.
   1.312 +
   1.313 +	@return The array of mime types.
   1.314 +
   1.315 +	@since  7.0s
   1.316 +	*/
   1.317 +	IMPORT_C const CDesC8Array& SupportedMimeTypes() const;
   1.318 +
   1.319 +	/**
   1.320 +	Returns the array of supported header data matches.
   1.321 +
   1.322 +	@return The array of header data.
   1.323 +	@since 7.0s
   1.324 +	*/
   1.325 +	IMPORT_C const CDesC8Array& SupportedHeaderData() const;
   1.326 +
   1.327 +	/**
   1.328 +	Tests whether this format provides support for the specified file extension, aFileExtension.
   1.329 +
   1.330 +	@param  aFileExtension
   1.331 +	        The requested file extension. Must be the extension only, and contain the dot '.'
   1.332 +
   1.333 +	@return A boolean indicating if the specified file extension is supported. ETrue if this format provides 
   1.334 +	        the required support, EFalse if it does not.
   1.335 +
   1.336 +	@since  7.0s
   1.337 +	*/
   1.338 +	IMPORT_C TBool SupportsFileExtension(const TDesC8& aFileExtension) const;
   1.339 +
   1.340 +	/**
   1.341 +	Tests whether this format provides support for aMimeType.
   1.342 +
   1.343 +	@param  aMimeType
   1.344 +	        The requested mime type.
   1.345 +
   1.346 +	@return A boolean indicating if the format is supported. ETrue if this format provides the required support, EFalse if not.
   1.347 +
   1.348 +	@since 7.0s
   1.349 +	*/
   1.350 +	IMPORT_C TBool SupportsMimeType(const TDesC8& aMimeType) const;
   1.351 +
   1.352 +	/**
   1.353 +	Tests whether this format provides support for aHeaderData.
   1.354 +	aHeaderData is searched for each chunk supported by this format.
   1.355 +
   1.356 +	@param	aHeaderData
   1.357 +	        The requested header data.
   1.358 +	        
   1.359 +	@return A boolean indicating if aHeaderData is supported. ETrue if this format provides the required support, EFalse if not.
   1.360 +
   1.361 +	@since  7.0s
   1.362 +	*/
   1.363 +	IMPORT_C TBool SupportsHeaderDataL(const TDesC8& aHeaderData) const;
   1.364 +
   1.365 +	/**
   1.366 +	Tests whether this format provides support for Custom Interfaces.
   1.367 +        
   1.368 +	@return A boolean indicating if Custom Interfaces are supported. ETrue if this format provides the required support, EFalse if not.
   1.369 +	*/
   1.370 +	IMPORT_C TBool SupportsCustomInterfaces() const;
   1.371 +
   1.372 +protected:
   1.373 +
   1.374 +	/** 
   1.375 +	Constructor 
   1.376 +	*/
   1.377 +	CMMFFormatImplementationInformation();
   1.378 +
   1.379 +	/** 
   1.380 +	2nd phase constructor 
   1.381 +	*/
   1.382 +	void ConstructL(const CImplementationInformation& aImplInfo);
   1.383 +
   1.384 +	/** 
   1.385 +	Adds a file extension to the array of extensions supported by this format. 
   1.386 +	*/
   1.387 +	void AddFileExtensionL(const TDesC8& aData);
   1.388 +
   1.389 +	/**
   1.390 +	Adds a mime type to the array of types supported by this format.
   1.391 +	*/
   1.392 +	void AddMimeTypeL(const TDesC8& aData);
   1.393 +
   1.394 +	/** 
   1.395 +	Adds a chunk of header data to the array of chunks supported by this format.
   1.396 +	*/
   1.397 +	void AddHeaderDataL(const TDesC8& aData);
   1.398 +
   1.399 +	/** 
   1.400 +	from MTaggedDataParserClient 
   1.401 +	*/
   1.402 +	void ProcessTaggedDataL(const TDesC8& aTag, const TDesC8& aData);
   1.403 +
   1.404 +private:
   1.405 +	class CBody;
   1.406 +	/** 
   1.407 +	CMMFFormatImplementationInformation body
   1.408 +	*/
   1.409 +	CBody* iBody;
   1.410 +	};
   1.411 +
   1.412 +
   1.413 +/**
   1.414 +@publishedAll
   1.415 +@released
   1.416 +
   1.417 +Contains controller plugin information retrieved from the ECom registry.
   1.418 +
   1.419 +The object is created using a CImplementationInformation object retrieved from the ECom registry.
   1.420 +All relevant data is copied out of the CImplementationInformation object, and its opaque data is
   1.421 +parsed to provide the supplier, supported media IDs.
   1.422 +
   1.423 +Notes for Format Plugin developers:
   1.424 +The exact formats supported by the controller plugin are calculated by:
   1.425 +
   1.426 +1. The formats supported by the controller plugin itself must be declared in separate entries in the
   1.427 +controller plugin resource file.  Two interface UIDs should be defined by the plugin writer - one
   1.428 +for the play formats supported, the other for the record formats supported.  The play formats are
   1.429 +then listed as implementations of the play format interface uid, and likewise the record formats.
   1.430 +
   1.431 +2. Format plugins (CMMFFormatEncode and CMMFFormatDecode) declare which controller plugin they
   1.432 +extend.  ECom is search for the format plugins that extend the controller plugin, and they
   1.433 +are added to the list.
   1.434 +
   1.435 +The opaque data section of the ECom plugin resource file must be in the format:
   1.436 +@code
   1.437 +
   1.438 +opaque_data = "<?>Data 1<?>Data 2<?>Data 3<?>Data 4[...]<?>Data N";
   1.439 +
   1.440 +The <?> preceding the data determines the meaning of the data.  The following are the possible tags:
   1.441 +
   1.442 +	<s> - Supplier - must be only one
   1.443 +	<i> - Media Id
   1.444 +	<p> - UID of play format 'interface' - must be only one
   1.445 +	<r> - UID of record format 'interface' - must be only one
   1.446 +
   1.447 +UIDs must always be in hex in the format '0x12345678', must include the '0x' and be 10 characters long.
   1.448 +@endcode
   1.449 +
   1.450 +@since 7.0s
   1.451 +*/
   1.452 +class CMMFControllerImplementationInformation : public CMMFPluginImplementationInformation, MTaggedDataParserClient
   1.453 +	{
   1.454 +public:
   1.455 +
   1.456 +	/**
   1.457 +	Constructs a new controller implementation information object.
   1.458 +
   1.459 +	@param  aImplInfo
   1.460 +	        The ECOM implementation information.
   1.461 +
   1.462 +	@return The new object created.
   1.463 +	
   1.464 +	@internalTechnology
   1.465 +
   1.466 +	@since  7.0s
   1.467 +	*/
   1.468 +	static CMMFControllerImplementationInformation* NewL(const CImplementationInformation& aImplInfo);
   1.469 +
   1.470 +	/**
   1.471 +	Constructs a new controller implementation information object.
   1.472 +
   1.473 +	Note: 
   1.474 +	The new object will be on the cleanup stack.
   1.475 +
   1.476 +	@param  aImplInfo
   1.477 +	        The ECOM implementation information
   1.478 +
   1.479 +	@return The new object created.
   1.480 +	
   1.481 +	@internalTechnology
   1.482 +
   1.483 +	@since  7.0s
   1.484 +	*/
   1.485 +	static CMMFControllerImplementationInformation* NewLC(const CImplementationInformation& aImplInfo);
   1.486 +
   1.487 +	/**
   1.488 +	Constructs a new controller implementation information object.
   1.489 +
   1.490 +	@param  aUid
   1.491 +	        The Uid of the controller to obtain controller implementation information
   1.492 +
   1.493 +	@return The new object created.
   1.494 +
   1.495 +	@since  7.0s
   1.496 +	*/
   1.497 +	IMPORT_C static CMMFControllerImplementationInformation* NewL(TUid aUid);
   1.498 +
   1.499 +	/**
   1.500 +	Destructor.
   1.501 +	
   1.502 +	@internalTechnology
   1.503 +	*/
   1.504 +	~CMMFControllerImplementationInformation();
   1.505 +
   1.506 +	/**
   1.507 +	Returns the array of play formats supported by this controller.
   1.508 +
   1.509 +	@return The play formats supported.
   1.510 +
   1.511 +	@since  7.0s
   1.512 +	*/
   1.513 +	IMPORT_C const RMMFFormatImplInfoArray& PlayFormats() const;
   1.514 +
   1.515 +	/**
   1.516 +	Returns the array of record formats supported by this controller.
   1.517 +
   1.518 +	@return The record formats supported.
   1.519 +
   1.520 +	@since  7.0s
   1.521 +	*/
   1.522 +	IMPORT_C const RMMFFormatImplInfoArray& RecordFormats() const;
   1.523 +
   1.524 +	/**
   1.525 +	Returns the heap space required by this controller.
   1.526 +
   1.527 +	@return The heap space required.
   1.528 +
   1.529 +	@since  7.0s
   1.530 +	*/
   1.531 +	IMPORT_C TUint HeapSpaceRequired() const;
   1.532 +	
   1.533 +	/**
   1.534 +	Queries the ECom registry for the play formats supported. 
   1.535 +	
   1.536 +	@internalTechnology
   1.537 +	*/
   1.538 +	void GetPlayFormatsL();
   1.539 +
   1.540 +	/** 
   1.541 +	Queries the ECom registry for the record formats supported.
   1.542 +	
   1.543 +	@internalTechnology
   1.544 +	*/
   1.545 +	void GetRecordFormatsL();
   1.546 +	
   1.547 +	/**
   1.548 +	Returns the uri schemes of this plugin.
   1.549 +
   1.550 +	@return The array of uri schemes.
   1.551 +
   1.552 +	@internalTechnology
   1.553 +	*/
   1.554 +	IMPORT_C const CDesC8Array& SupportedUriSchemes() const;
   1.555 +	
   1.556 +	/**
   1.557 +	Tests whether the plugin supports aUriScheme.
   1.558 +	
   1.559 +	@param  aUriScheme
   1.560 +	        The required Uri Scheme.
   1.561 +
   1.562 +	@return A boolean indicating if the plugin supports aUriScheme. ETrue if this plugin supports aUriScheme, EFalse if not.
   1.563 +
   1.564 +	@internalTechnology
   1.565 +	*/
   1.566 +	IMPORT_C TBool SupportsUriScheme(const TDesC8& aUriScheme) const;
   1.567 +	
   1.568 +	/**
   1.569 +	Tests whether the controller plugin supports url
   1.570 +		
   1.571 +	@return A boolean indicating if the plugin supports url. ETrue for uri supporting controller, EFalse if not.
   1.572 +	
   1.573 +	@internalTechnology
   1.574 +	*/
   1.575 +	IMPORT_C TBool SupportsNetworkCapability() const;
   1.576 +	
   1.577 +	/**
   1.578 +	Sets the uri priority of this controller
   1.579 +	
   1.580 +	@param  aUriPriority
   1.581 +	        The Uri priority to be assigned.
   1.582 +	        
   1.583 +	@internalTechnology
   1.584 +	*/
   1.585 +	IMPORT_C void SetUriPriority(TInt aUriPriority);
   1.586 +	
   1.587 +	/**
   1.588 +	Retrieves the uri priority of this controller. 
   1.589 +	Higher priority implies greater number. ie UriPriority() returning 3 
   1.590 +	has higher prioirty than UriPriority() returning 1.
   1.591 +	
   1.592 +	@return  The assigned Uri priority.
   1.593 +	
   1.594 +	@internalTechnology
   1.595 +	*/
   1.596 +	IMPORT_C TInt UriPriority() const;
   1.597 +	
   1.598 +	/**
   1.599 +	Check whether the controller plugin supports secure DRM process mode
   1.600 +		
   1.601 +	@return A boolean indicating if the plugin supports secure DRM process mode. 
   1.602 +	ETrue for secure DRM process mode supporting controller, EFalse if not.
   1.603 +	
   1.604 +	@internalTechnology
   1.605 +	*/
   1.606 +	IMPORT_C TBool SupportsSecureDRMProcessMode() const;
   1.607 +	
   1.608 +protected:
   1.609 +
   1.610 +	/**
   1.611 +	Constructor.
   1.612 +	
   1.613 +	@internalTechnology
   1.614 +	*/
   1.615 +	CMMFControllerImplementationInformation();
   1.616 +
   1.617 +	/**
   1.618 +	2nd phase constructor.
   1.619 +	
   1.620 +	@internalTechnology
   1.621 +	*/
   1.622 +	void ConstructL(const CImplementationInformation& aImplInfo);
   1.623 +
   1.624 +	/**
   1.625 +	Parses aData to get the collection UID of the play formats supported by this controller.
   1.626 +	
   1.627 +	@internalTechnology
   1.628 +	*/
   1.629 +	void SetPlayFormatCollectionUidL(const TDesC8& aData);
   1.630 +
   1.631 +	/**
   1.632 +	Parses aData to get the collection UID of the record formats supported by this controller.
   1.633 +	
   1.634 +	@internalTechnology
   1.635 +	*/
   1.636 +	void SetRecordFormatCollectionUidL(const TDesC8& aData);
   1.637 +
   1.638 +	/**
   1.639 +	Parses aData to get the size of the stack the controller requires.
   1.640 +	
   1.641 +	@internalTechnology
   1.642 +	*/
   1.643 +	void SetHeapSizeL(const TDesC8& aData);
   1.644 +
   1.645 +	/**
   1.646 +	From MTaggedDataParserClient.
   1.647 +	*/
   1.648 +	void ProcessTaggedDataL(const TDesC8& aTag, const TDesC8& aData);
   1.649 +
   1.650 +	/**
   1.651 +	Queries the ECom registry for:
   1.652 +		- all registry entries with an interface UID of aFormatCollectionUid
   1.653 +		- all format plugins with an interface UID of aFormatPluginCollectionUid (ie CMMFFormatEncode
   1.654 +		  or CMMFFormatDecode) that have the UID of this controller plugin in the default_data field
   1.655 +		  of their ECom resource file.
   1.656 +
   1.657 +	CMMFFormatImplementationInformation objects are created for each entry returned, and appended to
   1.658 +	aFormatArray.
   1.659 +
   1.660 +	@param  aFormatCollectionUid
   1.661 +	        See above.
   1.662 +	@param  aFormatPluginCollectionUid
   1.663 +	        See above.
   1.664 +	@param  aFormatArray
   1.665 +	        See above.
   1.666 +	        
   1.667 +	@internalTechnology
   1.668 +
   1.669 +	@since  7.0s
   1.670 +	*/
   1.671 +	void GetFormatsL(TUid aFormatCollectionUid, TUid aFormatPluginCollectionUid, RMMFFormatImplInfoArray& aFormatArray);
   1.672 +
   1.673 +	/**
   1.674 +	Creates CMMFFormatImplementationInformation objects for all CImplementationInformation objects
   1.675 +	in aEcomArray.  Any corrupt objects are ignored.  The objects created are added to aFormatArray.
   1.676 +
   1.677 +	@param  aEcomArray
   1.678 +	        See above.
   1.679 +	@param  aFormatArray
   1.680 +	        See above.
   1.681 +	        
   1.682 +	@internalTechnology
   1.683 +
   1.684 +	@since  7.0s
   1.685 +	*/
   1.686 +	void AddFormatsSwallowCorruptL(RImplInfoPtrArray& aEcomArray, RMMFFormatImplInfoArray& aFormatArray);
   1.687 +	
   1.688 +	/**
   1.689 +	Sets the Uri Scheme found in opaque data
   1.690 +	
   1.691 +	@param  aUriScheme
   1.692 +			Gives the uri scheme supported by the controller
   1.693 +	
   1.694 +	@internalTechnology
   1.695 +	*/
   1.696 +	void SetUriSchemeL(const TDesC8& aUriScheme);
   1.697 +	
   1.698 +	/**
   1.699 +	Sets the Network capability found in opaque data
   1.700 +	
   1.701 +	@param  aNetworkCapable
   1.702 +			Declares the incapability to support uri if matches to 'yes'. 
   1.703 +			If this is the case, iIsNetworkCtrl is set to EFalse
   1.704 +	
   1.705 +	@internalTechnology
   1.706 +	*/
   1.707 +	void SetNetworkCapabilityL(const TDesC8& aNetworkCapable);
   1.708 +
   1.709 +private:
   1.710 +
   1.711 +	/**
   1.712 +	The play formats supported by this controller.
   1.713 +	*/
   1.714 +	RMMFFormatImplInfoArray iPlayFormats;
   1.715 +
   1.716 +	/**
   1.717 +	The record formats supported by this controller.
   1.718 +	*/
   1.719 +	RMMFFormatImplInfoArray iRecordFormats;
   1.720 +
   1.721 +	/**
   1.722 +	The interface uid of the resource file definitions of the play formats supported directly by this controller.
   1.723 +	*/
   1.724 +	TUid iPlayFormatCollectionUid;
   1.725 +
   1.726 +	/**
   1.727 +	The interface uid of the resource file definitions of the record formats supported directly by this controller.
   1.728 +	*/
   1.729 +	TUid iRecordFormatCollectionUid;
   1.730 +	
   1.731 +	/**
   1.732 +	The heap space required by this controller
   1.733 +	*/
   1.734 +	TUint iHeapSpaceRequired;
   1.735 +	
   1.736 +	/**
   1.737 +	The Uri scheme supported by this plugin
   1.738 +	*/
   1.739 +	CDesC8Array* iUriSchemes;
   1.740 +	
   1.741 +	/**
   1.742 +	The uri priority acquired by this controller
   1.743 +	*/
   1.744 +	TInt iUriPriority;  
   1.745 +	
   1.746 +	/**
   1.747 +	The uri support provided by this controller
   1.748 +	*/
   1.749 +	TBool iIsNetworkCtrl;
   1.750 +	
   1.751 +	/**
   1.752 +	Secure DRM process model supported by this controller
   1.753 +	*/
   1.754 +	TBool  iSupportsSecureDRMProcessMode;
   1.755 +	};
   1.756 +
   1.757 +
   1.758 +/**
   1.759 +@publishedAll
   1.760 +
   1.761 +Contains the parameters used to select mmf plugins from the ECOM registry.
   1.762 +
   1.763 +@released
   1.764 +@since 7.0s
   1.765 +*/
   1.766 +class CMMFPluginSelectionParameters : public CBase
   1.767 +	{
   1.768 +public:
   1.769 +
   1.770 +/**
   1.771 +Describes the type of preferred supplier match to be performed on the plugins return from
   1.772 +the ECOM registry.
   1.773 +*/
   1.774 +enum TPreferredSupplierMatchType
   1.775 +	{
   1.776 +
   1.777 +	/**	No preferred supplier match will be performed.
   1.778 +	*/
   1.779 +	ENoPreferredSupplierMatch,
   1.780 +
   1.781 +	/** Plugins from all suppliers will be returned, but those from the preferred supplier will be first in the list.
   1.782 +	*/
   1.783 +	EPreferredSupplierPluginsFirstInList,
   1.784 +
   1.785 +	/** Only plugins from the preferred supplier will be returned.
   1.786 +	*/
   1.787 +	EOnlyPreferredSupplierPluginsReturned
   1.788 +	};
   1.789 +/**
   1.790 +Describes the type of media ID match to be performed on the plugins return from
   1.791 +the ECOM registry.
   1.792 +*/
   1.793 +enum TMediaIdMatchType
   1.794 +	{
   1.795 +
   1.796 +	/** No media ID match will be performed.
   1.797 +	*/
   1.798 +	ENoMediaIdMatch,
   1.799 +
   1.800 +	/** All plugins that support the media ID supplied will be returned, even those that support
   1.801 +	other media IDs.  For example, if an audio plugin is requested, plugins that support
   1.802 +	audio and video will also be returned.
   1.803 +	*/
   1.804 +	EAllowOtherMediaIds,
   1.805 +
   1.806 +	/** Only plugins that support the exact media IDs supplied will be returned.  For example, if an
   1.807 +	audio plugin is requested, plugins that only support audio will be returned
   1.808 +	(ie. no audio/video plugins).
   1.809 +	*/
   1.810 +	EAllowOnlySuppliedMediaIds
   1.811 +	};
   1.812 +
   1.813 +public:
   1.814 +
   1.815 +	/**
   1.816 +	Destructor.  Resets and destroys all member data.
   1.817 +
   1.818 +	@since 7.0s
   1.819 +	*/
   1.820 +	virtual ~CMMFPluginSelectionParameters();
   1.821 +
   1.822 +
   1.823 +	/**
   1.824 +	Sets the preferred supplier of the plugin.
   1.825 +
   1.826 +	@param  aPreferredSupplier
   1.827 +	        The preferred supplier of the plugin.
   1.828 +	@param  aMatchType
   1.829 +	        The type of match to be made.
   1.830 +
   1.831 +	@since  7.0s
   1.832 +	*/
   1.833 +	IMPORT_C void SetPreferredSupplierL(const TDesC& aPreferredSupplier, TPreferredSupplierMatchType aMatchType);
   1.834 +
   1.835 +	/**
   1.836 +	Sets the media IDs that must be supported by the plugin, for example audio, video etc.
   1.837 +
   1.838 +	@param  aMediaIds
   1.839 +	        An array of the media IDs that the selected plugins must support.
   1.840 +	@param  aMatchType
   1.841 +	        The type of match to be made.
   1.842 +
   1.843 +	@since  7.0s
   1.844 +	*/
   1.845 +	IMPORT_C void SetMediaIdsL(const RArray<TUid>& aMediaIds, TMediaIdMatchType aMatchType);
   1.846 +
   1.847 +	/**
   1.848 +	Returns the preferred supplier.  If no preferred supplier has been set, a blank 
   1.849 +	string will be returned.
   1.850 +	
   1.851 +	@return The preferred supplier
   1.852 +	@since 7.0s
   1.853 +	*/
   1.854 +	IMPORT_C const TDesC& PreferredSupplier() const;
   1.855 +
   1.856 +	/**
   1.857 +	Returns the type of preferred supplier match to perform.
   1.858 +
   1.859 +	@return The preferred supplier match type.
   1.860 +	@since 7.0s
   1.861 +	*/
   1.862 +	IMPORT_C TPreferredSupplierMatchType PreferredSupplierMatchType() const;
   1.863 +
   1.864 +	/**
   1.865 +	Returns the list of media IDs that must be supported by the plugin.
   1.866 +
   1.867 +	@return The list of media IDs.
   1.868 +
   1.869 +	@since	7.0s
   1.870 +	*/
   1.871 +	IMPORT_C const RArray<TUid>& MediaIds() const;
   1.872 +
   1.873 +	/**
   1.874 +	Returns the type of preferred supplier match to perform.
   1.875 +	
   1.876 +	@return The preferred supplier match type.
   1.877 +
   1.878 +	@since 7.0s
   1.879 +	*/
   1.880 +	IMPORT_C TMediaIdMatchType MediaIdMatchType() const;
   1.881 +
   1.882 +	/**
   1.883 +	Returns the uid of the interface to be searched for plugin matches.
   1.884 +
   1.885 +	@return The interface uid.
   1.886 +
   1.887 +	@since 7.0s
   1.888 +	*/
   1.889 +	IMPORT_C TUid InterfaceUid() const;
   1.890 +
   1.891 +protected:
   1.892 +
   1.893 +	/**
   1.894 +	Protected constructor.
   1.895 +
   1.896 +	Defaults to setting the TPreferredSupplierMatchType enum to ENoPreferredSupplierMatch and TMediaIdMatchType
   1.897 +	to ENoMediaIdMatch.
   1.898 +
   1.899 +	@param  aPluginInterfaceUid
   1.900 +	        The plugin's interface UID.
   1.901 +	*/
   1.902 +	CMMFPluginSelectionParameters(TUid aPluginInterfaceUid);
   1.903 +
   1.904 +	/**
   1.905 +	Tests whether the specified media is supported by the plugin.
   1.906 +
   1.907 +	@param  aPlugin
   1.908 +	        The media to test.
   1.909 +
   1.910 +	@return A boolean indicating if the specified media is supported by the plugin. ETrue if the specified 
   1.911 +	        media is supported by the plugin. EFalse if the specified media is not supported by the plugin.
   1.912 +	*/
   1.913 +	TBool CheckMediaIdSupportL(const CMMFPluginImplementationInformation& aPlugin) const;
   1.914 +private:
   1.915 +	TUid iPluginInterfaceUid;
   1.916 +	HBufC* iPreferredSupplier;
   1.917 +	TPreferredSupplierMatchType iPreferredSupplierMatchType;
   1.918 +	RArray<TUid> iMediaIds;
   1.919 +	TMediaIdMatchType iMediaIdMatchType;
   1.920 +	};
   1.921 +
   1.922 +/**
   1.923 +@publishedAll
   1.924 +
   1.925 +Defines the format support required.
   1.926 +
   1.927 +On construction, the selection parameters are blank, causing all plugins to be returned.
   1.928 +
   1.929 +@released
   1.930 +@since 7.0s
   1.931 +*/
   1.932 +class CMMFFormatSelectionParameters : public CBase
   1.933 +	{
   1.934 +public:
   1.935 +/**
   1.936 +Describes the type of match to be performed.
   1.937 +The match types are mutually exclusive.
   1.938 +*/
   1.939 +enum TMatchDataType
   1.940 +	{
   1.941 +
   1.942 +	/** All plugins will be selected. This is the default option.
   1.943 +	*/
   1.944 +	EMatchAny,
   1.945 +
   1.946 +	/** The match will be based on a file extension.
   1.947 +	*/
   1.948 +	EMatchFileExtension,
   1.949 +
   1.950 +	/** The match will be based on a mime type.
   1.951 +	*/
   1.952 +	EMatchMimeType,
   1.953 +
   1.954 +	/** The match will be based on a header data.
   1.955 +	*/
   1.956 +	EMatchHeaderData,
   1.957 +	
   1.958 +	/** 
   1.959 +	@publishedPartner
   1.960 +	@prototype
   1.961 +	
   1.962 +	The match will be based on Uri details.
   1.963 +	*/
   1.964 +	EMatchUri
   1.965 +	};
   1.966 +
   1.967 +public:
   1.968 +	
   1.969 +	/**
   1.970 +	Allocates and constructs a new format selection parameter object with blank parameters.
   1.971 +
   1.972 +	Calls NewLC().
   1.973 +
   1.974 +	@return A new format selection parameter object.
   1.975 +	*/
   1.976 +	IMPORT_C static CMMFFormatSelectionParameters* NewL();
   1.977 +
   1.978 +	/**
   1.979 +    Allocates and constructs a new format selection parameter object with blank parameters, placing it on the 
   1.980 +	cleanup stack.
   1.981 +
   1.982 +	@return A new format selection parameter object.
   1.983 +	*/
   1.984 +	IMPORT_C static CMMFFormatSelectionParameters* NewLC();
   1.985 +
   1.986 +	/**
   1.987 +	Allocates and constructs a new format selection parameter object with the specified parameters.
   1.988 +
   1.989 +	@param  aParams
   1.990 +	        The required parameters.
   1.991 +	@return A new format selection parameter object.
   1.992 +	*/
   1.993 +	static CMMFFormatSelectionParameters* NewL(const CMMFFormatSelectionParameters& aParams);
   1.994 +
   1.995 +	/**
   1.996 +	Sets this object to match to a file extension.
   1.997 +
   1.998 +	aFileName can be a full filename or just an extension.  If there is no dot in the filename
   1.999 +	and it is 5 characters or less in length then it is assumed to be an extension.  If the first
  1.1000 +	character of the filename is a dot, it assumed to be an extension.  Otherwise, the filename
  1.1001 +	is parsed using TParse to reveal the extension.
  1.1002 +
  1.1003 +	Once the extension has been extracted, it is converted from unicode to utf8 and copied into
  1.1004 +	iMatchData.
  1.1005 +
  1.1006 +	@param  aFileName
  1.1007 +	        The file name to be matched.  Must include the extension.
  1.1008 +
  1.1009 +	@since  7.0s
  1.1010 +	*/
  1.1011 +	IMPORT_C void SetMatchToFileNameL(const TDesC& aFileName);
  1.1012 +
  1.1013 +	/**
  1.1014 +	Sets this object to match to a file extension specified by a URI
  1.1015 +
  1.1016 +	Once the extension has been extracted, it is copied into iMatchData.
  1.1017 +
  1.1018 +   	@param  aUri
  1.1019 +	        The URI containing the file name to be matched.  Must include the extension.
  1.1020 +
  1.1021 +	@since  7.0s
  1.1022 +	*/
  1.1023 +	IMPORT_C void SetMatchToUriL(const TDesC& aUri);
  1.1024 +	
  1.1025 +	/**
  1.1026 +	@publishedPartner
  1.1027 +	@prototype
  1.1028 +	
  1.1029 +	Sets this object to match to uri scheme and file extension specified by a URI.
  1.1030 +	
  1.1031 +	The Uri scheme and extension are saved in iMatchReqData. Further,iMatchData contains uri extension, 
  1.1032 +	iMatchUriScheme contains uri scheme.
  1.1033 +
  1.1034 +	@param  aUri
  1.1035 +	        The URI containing the scheme and uri extension to be matched. 
  1.1036 +
  1.1037 +	*/
  1.1038 +	IMPORT_C void SetMatchToUriSupportL(const TDesC& aUri);
  1.1039 +	
  1.1040 +	/**
  1.1041 +	Sets this object to match to a MIME type.
  1.1042 +	
  1.1043 +	@param  aMimeType
  1.1044 +	        The mime type to match.
  1.1045 +
  1.1046 +	@since  7.0s
  1.1047 +	*/
  1.1048 +	IMPORT_C void SetMatchToMimeTypeL(const TDesC8& aMimeType);
  1.1049 +
  1.1050 +	/**
  1.1051 +	Sets this object to match to a pattern in header data.
  1.1052 +	
  1.1053 +	@param  aHeaderData
  1.1054 +	        The header of the file in question.  This header data will be matched
  1.1055 +	        against the match patterns provided by the plugins.
  1.1056 +
  1.1057 +	@since  7.0s
  1.1058 +	*/
  1.1059 +	IMPORT_C void SetMatchToHeaderDataL(const TDesC8& aHeaderData);
  1.1060 +
  1.1061 +	/**
  1.1062 +	Returns the data used to perform the plugin match.
  1.1063 +	
  1.1064 +	@return The match data.
  1.1065 +
  1.1066 +	@since  7.0s
  1.1067 +	*/
  1.1068 +	IMPORT_C const TDesC8& MatchData() const;
  1.1069 +	
  1.1070 +	/**
  1.1071 +	@publishedPartner
  1.1072 +	@prototype
  1.1073 +	
  1.1074 +	Returns the uri scheme used to perform the plugin match.
  1.1075 +	
  1.1076 +	@return The uri scheme.
  1.1077 +
  1.1078 +	*/
  1.1079 +	IMPORT_C const TDesC8& MatchUriScheme() const;
  1.1080 +
  1.1081 +	/**
  1.1082 +	Returns the type of the data used to perform the plugin match.
  1.1083 +
  1.1084 +	@return The match data type.
  1.1085 +
  1.1086 +	@since  7.0s
  1.1087 +	*/
  1.1088 +	IMPORT_C TMatchDataType MatchDataType() const;
  1.1089 +	
  1.1090 +	/**
  1.1091 +	Destructor.
  1.1092 +	*/
  1.1093 +	virtual ~CMMFFormatSelectionParameters();
  1.1094 +protected:
  1.1095 +
  1.1096 +	/**
  1.1097 +	Protected constructor.
  1.1098 +	*/
  1.1099 +	CMMFFormatSelectionParameters();
  1.1100 +	void ConstructL(const CMMFFormatSelectionParameters& aParams);
  1.1101 +
  1.1102 +private:
  1.1103 +	CMatchData* iMatchReqData;
  1.1104 +	TMatchDataType iMatchDataType;
  1.1105 +	};
  1.1106 +
  1.1107 +
  1.1108 +
  1.1109 +/**
  1.1110 +@publishedAll
  1.1111 +@released
  1.1112 +
  1.1113 +Contains the parameters used to select controller plugins from the ECOM registry.
  1.1114 +
  1.1115 +@since  7.0s
  1.1116 +*/
  1.1117 +class CMMFControllerPluginSelectionParameters : public CMMFPluginSelectionParameters
  1.1118 +	{
  1.1119 +public:
  1.1120 +
  1.1121 +	/**
  1.1122 +	Constructs a new controller selection parameters object.
  1.1123 +
  1.1124 +	@return The new object created.
  1.1125 +
  1.1126 +	@since  7.0s
  1.1127 +	*/
  1.1128 +	IMPORT_C static CMMFControllerPluginSelectionParameters* NewL();
  1.1129 +
  1.1130 +	/**
  1.1131 +	Construct a new controller selection parameters object.
  1.1132 +	
  1.1133 +	@return The new object created.  Note that the new object will be left on the cleanup stack.
  1.1134 +
  1.1135 +	@since  7.0s
  1.1136 +	*/
  1.1137 +	IMPORT_C static CMMFControllerPluginSelectionParameters* NewLC();
  1.1138 +
  1.1139 +	/**
  1.1140 +	Sets the play format support required.
  1.1141 +
  1.1142 +	Note:
  1.1143 +	The play formats supported by the controller plugins will only be retrieved if
  1.1144 +	this method is called.  To get all the play formats supported by the system, call this
  1.1145 +	with a 'blank' CMMFFormatSelectionParameters object.
  1.1146 +
  1.1147 +	@param  aRequiredSupport
  1.1148 +	        The play format support required.
  1.1149 +
  1.1150 +	@since  7.0s
  1.1151 +	*/
  1.1152 +	IMPORT_C void SetRequiredPlayFormatSupportL(const CMMFFormatSelectionParameters& aRequiredSupport);
  1.1153 +
  1.1154 +	/**
  1.1155 +	Sets the record format support required.
  1.1156 +
  1.1157 +	Note:
  1.1158 +	The record formats supported by the controller plugins will only be retrieved if
  1.1159 +	this method is called.  To get all the record formats supported by the system, call this
  1.1160 +	with a 'blank' CMMFFormatSelectionParameters object.
  1.1161 +
  1.1162 +	@param  aRequiredSupport
  1.1163 +	        The record format support required.
  1.1164 +
  1.1165 +	@return The new object created.
  1.1166 +
  1.1167 +	@since  7.0s
  1.1168 +	*/
  1.1169 +	IMPORT_C void SetRequiredRecordFormatSupportL(const CMMFFormatSelectionParameters& aRequiredSupport);
  1.1170 +
  1.1171 +	/**
  1.1172 +	Retrieves all controller plugins that support the requirements of the caller.
  1.1173 +
  1.1174 +	@param  aImplementations	
  1.1175 +	        After this method returns, this array will contain all the
  1.1176 +	        controller plugins that support the caller's requirements.
  1.1177 +	        Note: The array will be emptied by this method.
  1.1178 +
  1.1179 +	@since  7.0s
  1.1180 +	*/
  1.1181 +	IMPORT_C virtual void ListImplementationsL(RMMFControllerImplInfoArray& aImplementations) const;
  1.1182 +	
  1.1183 +	/** 
  1.1184 +	Destructor
  1.1185 +	*/
  1.1186 +	virtual ~CMMFControllerPluginSelectionParameters();
  1.1187 +protected:
  1.1188 +	CMMFControllerPluginSelectionParameters();
  1.1189 +	void MatchImplementationToSelectParamsL(RMMFControllerImplInfoArray& aImplementations, const CMMFControllerImplementationInformation& aPlugin, TInt& aArrayPos) const;
  1.1190 +	TInt CheckPreferredSupplierL(RMMFControllerImplInfoArray& aImplementations, const CMMFControllerImplementationInformation& aPlugin) const;
  1.1191 +	TBool CheckFormatSupportL(CMMFFormatSelectionParameters* aSelectParams, const RMMFFormatImplInfoArray& aFormats) const;
  1.1192 +	/**
  1.1193 +	Checks the given Controller for uri support. Uri support may be there 
  1.1194 +	if either requiredscheme or extension matches with that given controller
  1.1195 +	
  1.1196 +	@param  aSelectParams 
  1.1197 +			Describes the selection parameter which a controller needs to 
  1.1198 +			support in order to be selected
  1.1199 +			
  1.1200 +	@param	aPlugin
  1.1201 +			The controller plugin which is checked for uri support 
  1.1202 +			
  1.1203 +	@param	aFormats
  1.1204 +			The play or record formats looked for extension match
  1.1205 +	*/
  1.1206 +	TBool CheckUriSupport(CMMFFormatSelectionParameters* aSelectParams, CMMFControllerImplementationInformation* aPlugin, const RMMFFormatImplInfoArray& aFormats) const;
  1.1207 +
  1.1208 +protected:
  1.1209 +	/**
  1.1210 +	The required play format support
  1.1211 +	*/
  1.1212 +	CMMFFormatSelectionParameters* iRequiredPlayFormatSupport;
  1.1213 +	
  1.1214 +	/**
  1.1215 +	The required record format support
  1.1216 +	*/
  1.1217 +	CMMFFormatSelectionParameters* iRequiredRecordFormatSupport;
  1.1218 +	};
  1.1219 +
  1.1220 +/**
  1.1221 +@publishedAll
  1.1222 +@released
  1.1223 +
  1.1224 +Contains the parameters used to select controller plugins which support SecureDRM model 
  1.1225 +from the ECOM registry. Controller plugins which support SecureDRM model allow play back of DRM-protected
  1.1226 +content by client processes without DRM capability. In such case the controller will be loaded in a separate secure DRM process.
  1.1227 +*/
  1.1228 +class CMMFControllerSecureDrmPluginSelectionParameters : public CMMFControllerPluginSelectionParameters
  1.1229 +	{
  1.1230 +
  1.1231 +public:
  1.1232 +	/**
  1.1233 +	Constructs a new controller selection parameters object.
  1.1234 +
  1.1235 +	@return The new object created.
  1.1236 +	*/
  1.1237 +	IMPORT_C static CMMFControllerSecureDrmPluginSelectionParameters* NewL();
  1.1238 +
  1.1239 +	/**
  1.1240 +	Construct a new controller selection parameters object.
  1.1241 +	
  1.1242 +	@return The new object created.  Note that the new object will be left on the cleanup stack.
  1.1243 +	*/
  1.1244 +	IMPORT_C static CMMFControllerSecureDrmPluginSelectionParameters* NewLC();
  1.1245 +	
  1.1246 +	/**
  1.1247 +	Retrieves all controller plugins that support SecureDRM model and the requirements of the caller.
  1.1248 +
  1.1249 +	@param  aImplementations	
  1.1250 +	        After this method returns, this array will contain all the
  1.1251 +	        controller plugins that support the caller's requirements.
  1.1252 +	        Note: The array will be emptied by this method and SecureDRM model.
  1.1253 +	*/
  1.1254 +	IMPORT_C virtual void ListImplementationsL(RMMFControllerImplInfoArray& aImplementations) const;
  1.1255 +
  1.1256 +	/** 
  1.1257 +	Destructor
  1.1258 +	*/
  1.1259 +	virtual ~CMMFControllerSecureDrmPluginSelectionParameters() {};
  1.1260 +protected:
  1.1261 +	CMMFControllerSecureDrmPluginSelectionParameters();
  1.1262 +	};
  1.1263 +
  1.1264 +class CMmfRecognizerUtil; // declared here.
  1.1265 +/**
  1.1266 +@internalAll
  1.1267 +
  1.1268 +MMF utility class used by MMF recognizer
  1.1269 +Maintains an array of CMMFControllerImplementationInformation objects
  1.1270 +so that data headers can be speedily matched against.
  1.1271 +Updates the array when notified by ECOM of a change to the global
  1.1272 +interface implementation registration data.
  1.1273 +*/
  1.1274 +NONSHARABLE_CLASS( CMmfRecognizerUtil ): public CBase
  1.1275 +	{
  1.1276 +public:
  1.1277 +	enum TMatchLevel
  1.1278 +		{
  1.1279 +		EMatchNone, //no match
  1.1280 +		EMatchData, //data match only
  1.1281 +		EMatchName  //suffix and data match
  1.1282 +		};
  1.1283 +public:
  1.1284 +	IMPORT_C static void GetMimeTypesL(CDesC8Array* aMimeTypes);
  1.1285 +
  1.1286 +	IMPORT_C static CMmfRecognizerUtil* NewL();
  1.1287 +
  1.1288 +	~CMmfRecognizerUtil();
  1.1289 +	IMPORT_C TMatchLevel GetMimeTypeL(const TDesC& aFileName, const TDesC8& aImageData, TDes8& aMimeType);
  1.1290 +
  1.1291 +private:
  1.1292 +	CMmfRecognizerUtil();
  1.1293 +	void ConstructL();
  1.1294 +
  1.1295 +private:
  1.1296 +	class CBody;
  1.1297 +	CBody* iBody;
  1.1298 +	};
  1.1299 +
  1.1300 +
  1.1301 +/**
  1.1302 +@publishedAll
  1.1303 +@released
  1.1304 +
  1.1305 +Abstract class used to contain the parameters used to select format plugins from the ECOM registry.
  1.1306 +
  1.1307 +Note: 
  1.1308 +The classes CMMFFormatEncodePluginSelectionParamters and CMMFFormatDecodePluginSelectionParameters
  1.1309 +should be used to list and select format plugin implementations.
  1.1310 +
  1.1311 +@since  7.0s
  1.1312 +*/
  1.1313 +class CMMFFormatPluginSelectionParameters : public CMMFPluginSelectionParameters
  1.1314 +	{
  1.1315 +public:
  1.1316 +
  1.1317 +	/**
  1.1318 +	Retrieves all format plugins that support the requirements of the caller.
  1.1319 +
  1.1320 +	@param  aImplementations
  1.1321 +	        After this function returns, this array will contain all the
  1.1322 +	        format plugins that support the caller's requirements.
  1.1323 +	        Note: The array will be emptied by this method.
  1.1324 +
  1.1325 +	@since  7.0s
  1.1326 +	*/
  1.1327 +	IMPORT_C void ListImplementationsL(RMMFFormatImplInfoArray& aImplementations) const;
  1.1328 +
  1.1329 +	/**
  1.1330 +	Sets the format support required.
  1.1331 +
  1.1332 +	@param  aRequiredSupport
  1.1333 +	        The format support required.
  1.1334 +
  1.1335 +	@since  7.0s
  1.1336 +	*/
  1.1337 +	IMPORT_C void SetRequiredFormatSupportL(const CMMFFormatSelectionParameters& aRequiredSupport);
  1.1338 +
  1.1339 +	/**
  1.1340 +	Destructor.
  1.1341 +	*/
  1.1342 +	virtual ~CMMFFormatPluginSelectionParameters();
  1.1343 +protected:
  1.1344 +	/**
  1.1345 +	Protected constructor.
  1.1346 +	*/
  1.1347 +	CMMFFormatPluginSelectionParameters(TUid aInterfaceUid);
  1.1348 +
  1.1349 +	void MatchImplementationToSelectParamsL(RMMFFormatImplInfoArray& aImplementations, const CMMFFormatImplementationInformation& aPlugin, TInt& aArrayPos) const;
  1.1350 +	TInt CheckPreferredSupplierL(RMMFFormatImplInfoArray& aImplementations, const CMMFFormatImplementationInformation& aPlugin) const;
  1.1351 +	TBool CheckFormatSupportL(const CMMFFormatImplementationInformation& aPlugin) const;
  1.1352 +protected:
  1.1353 +	/**
  1.1354 +	The format support required
  1.1355 +	*/
  1.1356 +	CMMFFormatSelectionParameters* iRequiredFormatSupport;
  1.1357 +	};
  1.1358 +
  1.1359 +/**
  1.1360 +@publishedAll
  1.1361 +@released
  1.1362 +
  1.1363 +Class used to list and select plugins implementing the CMMFFormatEncode interface.
  1.1364 +
  1.1365 +@since 7.0s
  1.1366 +*/
  1.1367 +class CMMFFormatEncodePluginSelectionParameters : public CMMFFormatPluginSelectionParameters
  1.1368 +	{
  1.1369 +public:
  1.1370 +
  1.1371 +	/**
  1.1372 +	Construct a new format encode selection parameters object.
  1.1373 +	
  1.1374 +	@return The new object created.
  1.1375 +
  1.1376 +	@since  7.0s
  1.1377 +	*/
  1.1378 +	IMPORT_C static CMMFFormatEncodePluginSelectionParameters* NewL();
  1.1379 +
  1.1380 +	/**
  1.1381 +	Constructs a new format encode selection parameters object.
  1.1382 +
  1.1383 +	@return The new object created.  Note that the new object will be left on the cleanup stack.
  1.1384 +
  1.1385 +	@since  7.0s
  1.1386 +	*/
  1.1387 +	IMPORT_C static CMMFFormatEncodePluginSelectionParameters* NewLC();
  1.1388 +protected:
  1.1389 +	/**
  1.1390 +	Protected constructor.
  1.1391 +	*/
  1.1392 +	CMMFFormatEncodePluginSelectionParameters();
  1.1393 +	};
  1.1394 +
  1.1395 +
  1.1396 +/**
  1.1397 +@publishedAll
  1.1398 +@released
  1.1399 +
  1.1400 +Class used to list and select plugins implementing the CMMFFormatDecode interface.
  1.1401 +
  1.1402 +@since 7.0s
  1.1403 +*/
  1.1404 +class CMMFFormatDecodePluginSelectionParameters : public CMMFFormatPluginSelectionParameters
  1.1405 +	{
  1.1406 +public:
  1.1407 +
  1.1408 +	/**
  1.1409 +	Constructs a new format decode selection parameters object.
  1.1410 +
  1.1411 +	@return The new object created.
  1.1412 +	
  1.1413 +	@since  7.0s
  1.1414 +	*/
  1.1415 +	IMPORT_C static CMMFFormatDecodePluginSelectionParameters* NewL();
  1.1416 +
  1.1417 +	/**
  1.1418 +	Constructs a new format decode selection parameters object.
  1.1419 +
  1.1420 +	@return The new object created. Note that the new object will be left on the cleanup stack.
  1.1421 +
  1.1422 +	@since  7.0s
  1.1423 +	*/
  1.1424 +	IMPORT_C static CMMFFormatDecodePluginSelectionParameters* NewLC();
  1.1425 +protected:
  1.1426 +	/**
  1.1427 +	Protected constructor.
  1.1428 +	*/
  1.1429 +	CMMFFormatDecodePluginSelectionParameters();
  1.1430 +	};
  1.1431 +
  1.1432 +
  1.1433 +
  1.1434 +/** 
  1.1435 +@publishedAll
  1.1436 +@released
  1.1437 +
  1.1438 +Template class CleanupResetAndDestroy to clean up the array
  1.1439 +of implementation information from the cleanup stack.
  1.1440 +*/
  1.1441 +
  1.1442 +template <class T>
  1.1443 +class CleanupResetAndDestroy
  1.1444 +	{
  1.1445 +public:
  1.1446 +	/**
  1.1447 +	Puts an item on the cleanup stack.
  1.1448 +
  1.1449 +	@param  aRef 
  1.1450 +	        The implementation information to be put on the cleanup stack.
  1.1451 +	*/
  1.1452 +	inline static void PushL(T& aRef);
  1.1453 +private:
  1.1454 +	static void ResetAndDestroy(TAny *aPtr);
  1.1455 +	};
  1.1456 +template <class T>
  1.1457 +inline void CleanupResetAndDestroyPushL(T& aRef);
  1.1458 +template <class T>
  1.1459 +inline void CleanupResetAndDestroy<T>::PushL(T& aRef)
  1.1460 +	{CleanupStack::PushL(TCleanupItem(&ResetAndDestroy,&aRef));}
  1.1461 +template <class T>
  1.1462 +void CleanupResetAndDestroy<T>::ResetAndDestroy(TAny *aPtr)
  1.1463 +	{(STATIC_CAST(T*,aPtr))->ResetAndDestroy();}
  1.1464 +template <class T>
  1.1465 +inline void CleanupResetAndDestroyPushL(T& aRef)
  1.1466 +	{CleanupResetAndDestroy<T>::PushL(aRef);}
  1.1467 +
  1.1468 +
  1.1469 +#endif