1 // Copyright (c) 2002-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // mmf\common\mmfcontrollerpluginresolver.h
18 #ifndef MMF_COMMON_MMFCONTROLLERPLUGINRESOLVER_H
19 #define MMF_COMMON_MMFCONTROLLERPLUGINRESOLVER_H
21 #include <ecom/ecom.h>
29 Default heap size for the controller thread
31 const TUint KMMFDefaultControllerThreadHeapSize = 0x100000; //1MB
34 class CMMFFormatImplementationInformation;
40 Array of CMMFFormatImplementationInformation
42 typedef RPointerArray<CMMFFormatImplementationInformation> RMMFFormatImplInfoArray;
44 class CMMFControllerImplementationInformation;
50 Array of CMMFControllerImplementationInformation
52 typedef RPointerArray<CMMFControllerImplementationInformation> RMMFControllerImplInfoArray;
61 Abstract class that contains basic information about ECom Multimedia plugins.
66 class CMMFPluginImplementationInformation : public CBase
71 Returns the uid of this particular plugin implementation.
72 This is the UID used to instantiate this multimedia plugin.
74 @return The implementation uid.
78 IMPORT_C TUid Uid() const;
81 Returns the display name of this plugin implementation.
83 @return The display name.
87 IMPORT_C const TDesC& DisplayName() const;
90 Returns the name of the supplier of this plugin implementation, e.g. "Symbian".
92 @return The plugin supplier.
96 IMPORT_C const TDesC& Supplier() const;
99 Returns the version number of this plugin.
101 @return The version number.
105 IMPORT_C TInt Version() const;
108 Returns the array of media IDs supported by this plugin.
110 The media ID can be used by clients to determine whether the plugin supports audio or
111 video data (or both). A UID is used for the media ID to provide future extensibility.
113 @return The array of media IDs.
117 IMPORT_C const RArray<TUid>& SupportedMediaIds() const;
120 Tests whether this plugin was supplied by aSupplier.
123 The required supplier.
125 @return A boolean indicating if this plugin was supplied by aSupplier. ETrue if this plugin was supplied
126 by aSupplier, EFalse if not.
130 IMPORT_C TBool SupportsSupplier(const TDesC& aSupplier) const;
133 Tests whether this plugin supports aMediaId.
136 The required media id.
138 @return A boolean indicating if the plugin supports aMediaId. ETrue if this plugin supports aMediaId, EFalse if not.
142 IMPORT_C TBool SupportsMediaId(TUid aMediaId) const;
147 virtual ~CMMFPluginImplementationInformation();
154 CMMFPluginImplementationInformation();
157 Sets the supplier. Takes a copy of aData.
159 void SetSupplierL(const TDesC8& aData);
162 Adds a media id. aData is parsed to find the uid of the media id to be added.
164 void AddMediaIdL(const TDesC8& aData);
169 The UID of this plugin.
174 The display name of this plugin.
179 The supplier of this plugin.
184 The version number of this plugin.
189 The media ids supported by this plugin.
191 RArray<TUid> iMediaIds;
194 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
195 #include <mmf/common/taggeddataparser.h>
201 Interface to be implemented by customers of the class TaggedDataParser.
203 class MTaggedDataParserClient
206 virtual void ProcessTaggedDataL(const TDesC8& aTag, const TDesC8& aData) = 0;
213 Contains format support information retrieved from the ECom registry.
215 An object of this type may describe either a concrete format plugin (ie a CMMFFormatEncode or a
216 CMMFFormatDecode implementation) or a format supported by a controller plugin.
218 The object is created using a CImplementationInformation object retrieved from the ECom registry.
219 All relevant data is copied out of the CImplementationInformation object, and its opaque data is
220 parsed to provide the supplier, supported media ids, supported mime types, supported file extensions,
221 and supported header data matches.
223 Notes for Format Plugin developers:
225 The opaque data section of the ECom plugin resource file must be in the format:
227 opaque_data = "<?>Data 1<?>Data 2<?>Data 3<?>Data 4[...]<?>Data N";
229 The <?> preceding the data determines the meaning of the data. The following are the possible tags:
236 <c> - Custom Interfaces
238 UIDs must always be in hex in the format '0x12345678', must include the '0x' and be 10 characters long
243 class CMMFFormatImplementationInformation : public CMMFPluginImplementationInformation, MTaggedDataParserClient
247 Constructs a new format implementation information object.
250 The ECOM implementation information
252 @return The new object created.
256 static CMMFFormatImplementationInformation* NewL(const CImplementationInformation& aImplInfo);
259 Constructs a new format implementation information object.
262 The ECOM implementation information
264 @return The new object created. Note that this will be on the cleanup stack.
268 static CMMFFormatImplementationInformation* NewLC(const CImplementationInformation& aImplInfo);
273 virtual ~CMMFFormatImplementationInformation();
276 Returns the array of supported file extensions.
278 @return The array of file extensions.
281 IMPORT_C const CDesC8Array& SupportedFileExtensions() const;
284 Returns the array of supported mime types.
286 @return The array of mime types.
290 IMPORT_C const CDesC8Array& SupportedMimeTypes() const;
293 Returns the array of supported header data matches.
295 @return The array of header data.
298 IMPORT_C const CDesC8Array& SupportedHeaderData() const;
301 Tests whether this format provides support for the specified file extension, aFileExtension.
303 @param aFileExtension
304 The requested file extension. Must be the extension only, and contain the dot '.'
306 @return A boolean indicating if the specified file extension is supported. ETrue if this format provides
307 the required support, EFalse if it does not.
311 IMPORT_C TBool SupportsFileExtension(const TDesC8& aFileExtension) const;
314 Tests whether this format provides support for aMimeType.
317 The requested mime type.
319 @return A boolean indicating if the format is supported. ETrue if this format provides the required support, EFalse if not.
323 IMPORT_C TBool SupportsMimeType(const TDesC8& aMimeType) const;
326 Tests whether this format provides support for aHeaderData.
327 aHeaderData is searched for each chunk supported by this format.
330 The requested header data.
332 @return A boolean indicating if aHeaderData is supported. ETrue if this format provides the required support, EFalse if not.
336 IMPORT_C TBool SupportsHeaderDataL(const TDesC8& aHeaderData) const;
339 Tests whether this format provides support for Custom Interfaces.
341 @return A boolean indicating if Custom Interfaces are supported. ETrue if this format provides the required support, EFalse if not.
343 IMPORT_C TBool SupportsCustomInterfaces() const;
350 CMMFFormatImplementationInformation();
353 2nd phase constructor
355 void ConstructL(const CImplementationInformation& aImplInfo);
358 Adds a file extension to the array of extensions supported by this format.
360 void AddFileExtensionL(const TDesC8& aData);
363 Adds a mime type to the array of types supported by this format.
365 void AddMimeTypeL(const TDesC8& aData);
368 Adds a chunk of header data to the array of chunks supported by this format.
370 void AddHeaderDataL(const TDesC8& aData);
373 from MTaggedDataParserClient
375 void ProcessTaggedDataL(const TDesC8& aTag, const TDesC8& aData);
380 CMMFFormatImplementationInformation body
390 Contains controller plugin information retrieved from the ECom registry.
392 The object is created using a CImplementationInformation object retrieved from the ECom registry.
393 All relevant data is copied out of the CImplementationInformation object, and its opaque data is
394 parsed to provide the supplier, supported media IDs.
396 Notes for Format Plugin developers:
397 The exact formats supported by the controller plugin are calculated by:
399 1. The formats supported by the controller plugin itself must be declared in separate entries in the
400 controller plugin resource file. Two interface UIDs should be defined by the plugin writer - one
401 for the play formats supported, the other for the record formats supported. The play formats are
402 then listed as implementations of the play format interface uid, and likewise the record formats.
404 2. Format plugins (CMMFFormatEncode and CMMFFormatDecode) declare which controller plugin they
405 extend. ECom is search for the format plugins that extend the controller plugin, and they
406 are added to the list.
408 The opaque data section of the ECom plugin resource file must be in the format:
411 opaque_data = "<?>Data 1<?>Data 2<?>Data 3<?>Data 4[...]<?>Data N";
413 The <?> preceding the data determines the meaning of the data. The following are the possible tags:
415 <s> - Supplier - must be only one
417 <p> - UID of play format 'interface' - must be only one
418 <r> - UID of record format 'interface' - must be only one
420 UIDs must always be in hex in the format '0x12345678', must include the '0x' and be 10 characters long.
425 class CMMFControllerImplementationInformation : public CMMFPluginImplementationInformation, MTaggedDataParserClient
430 Constructs a new controller implementation information object.
433 The ECOM implementation information.
435 @return The new object created.
441 static CMMFControllerImplementationInformation* NewL(const CImplementationInformation& aImplInfo);
444 Constructs a new controller implementation information object.
447 The new object will be on the cleanup stack.
450 The ECOM implementation information
452 @return The new object created.
458 static CMMFControllerImplementationInformation* NewLC(const CImplementationInformation& aImplInfo);
461 Constructs a new controller implementation information object.
464 The Uid of the controller to obtain controller implementation information
466 @return The new object created.
470 IMPORT_C static CMMFControllerImplementationInformation* NewL(TUid aUid);
477 ~CMMFControllerImplementationInformation();
480 Returns the array of play formats supported by this controller.
482 @return The play formats supported.
486 IMPORT_C const RMMFFormatImplInfoArray& PlayFormats() const;
489 Returns the array of record formats supported by this controller.
491 @return The record formats supported.
495 IMPORT_C const RMMFFormatImplInfoArray& RecordFormats() const;
498 Returns the heap space required by this controller.
500 @return The heap space required.
504 IMPORT_C TUint HeapSpaceRequired() const;
507 Queries the ECom registry for the play formats supported.
511 void GetPlayFormatsL();
514 Queries the ECom registry for the record formats supported.
518 void GetRecordFormatsL();
521 Returns the uri schemes of this plugin.
523 @return The array of uri schemes.
527 IMPORT_C const CDesC8Array& SupportedUriSchemes() const;
530 Tests whether the plugin supports aUriScheme.
533 The required Uri Scheme.
535 @return A boolean indicating if the plugin supports aUriScheme. ETrue if this plugin supports aUriScheme, EFalse if not.
539 IMPORT_C TBool SupportsUriScheme(const TDesC8& aUriScheme) const;
542 Tests whether the controller plugin supports url
544 @return A boolean indicating if the plugin supports url. ETrue for uri supporting controller, EFalse if not.
548 IMPORT_C TBool SupportsNetworkCapability() const;
551 Sets the uri priority of this controller
554 The Uri priority to be assigned.
558 IMPORT_C void SetUriPriority(TInt aUriPriority);
561 Retrieves the uri priority of this controller.
562 Higher priority implies greater number. ie UriPriority() returning 3
563 has higher prioirty than UriPriority() returning 1.
565 @return The assigned Uri priority.
569 IMPORT_C TInt UriPriority() const;
572 Check whether the controller plugin supports secure DRM process mode
574 @return A boolean indicating if the plugin supports secure DRM process mode.
575 ETrue for secure DRM process mode supporting controller, EFalse if not.
579 IMPORT_C TBool SupportsSecureDRMProcessMode() const;
582 Returns the stack space required by this controller.
584 @return The stack space required.
588 IMPORT_C TUint StackSize() const;
597 CMMFControllerImplementationInformation();
600 2nd phase constructor.
604 void ConstructL(const CImplementationInformation& aImplInfo);
607 Parses aData to get the collection UID of the play formats supported by this controller.
611 void SetPlayFormatCollectionUidL(const TDesC8& aData);
614 Parses aData to get the collection UID of the record formats supported by this controller.
618 void SetRecordFormatCollectionUidL(const TDesC8& aData);
621 Parses aData to get the size of the stack the controller requires.
625 void SetHeapSizeL(const TDesC8& aData);
628 From MTaggedDataParserClient.
630 void ProcessTaggedDataL(const TDesC8& aTag, const TDesC8& aData);
633 Queries the ECom registry for:
634 - all registry entries with an interface UID of aFormatCollectionUid
635 - all format plugins with an interface UID of aFormatPluginCollectionUid (ie CMMFFormatEncode
636 or CMMFFormatDecode) that have the UID of this controller plugin in the default_data field
637 of their ECom resource file.
639 CMMFFormatImplementationInformation objects are created for each entry returned, and appended to
642 @param aFormatCollectionUid
644 @param aFormatPluginCollectionUid
653 void GetFormatsL(TUid aFormatCollectionUid, TUid aFormatPluginCollectionUid, RMMFFormatImplInfoArray& aFormatArray);
656 Creates CMMFFormatImplementationInformation objects for all CImplementationInformation objects
657 in aEcomArray. Any corrupt objects are ignored. The objects created are added to aFormatArray.
668 void AddFormatsSwallowCorruptL(RImplInfoPtrArray& aEcomArray, RMMFFormatImplInfoArray& aFormatArray);
671 Sets the Uri Scheme found in opaque data
674 Gives the uri scheme supported by the controller
678 void SetUriSchemeL(const TDesC8& aUriScheme);
681 Sets the Network capability found in opaque data
683 @param aNetworkCapable
684 Declares the incapability to support uri if matches to 'yes'.
685 If this is the case, iIsNetworkCtrl is set to EFalse
689 void SetNetworkCapabilityL(const TDesC8& aNetworkCapable);
692 Parses aData to get the size of the stack the controller requires.
696 void SetStackSizeL(const TDesC8& aData);
702 The play formats supported by this controller.
704 RMMFFormatImplInfoArray iPlayFormats;
707 The record formats supported by this controller.
709 RMMFFormatImplInfoArray iRecordFormats;
712 The interface uid of the resource file definitions of the play formats supported directly by this controller.
714 TUid iPlayFormatCollectionUid;
717 The interface uid of the resource file definitions of the record formats supported directly by this controller.
719 TUid iRecordFormatCollectionUid;
722 The heap space required by this controller
724 TUint iHeapSpaceRequired;
727 The Uri scheme supported by this plugin
729 CDesC8Array* iUriSchemes;
732 The uri priority acquired by this controller
737 The uri support provided by this controller
739 TBool iIsNetworkCtrl;
742 Secure DRM process model supported by this controller
744 TBool iSupportsSecureDRMProcessMode;
746 The stack space required by this controller
755 Contains the parameters used to select mmf plugins from the ECOM registry.
760 class CMMFPluginSelectionParameters : public CBase
765 Describes the type of preferred supplier match to be performed on the plugins return from
768 enum TPreferredSupplierMatchType
771 /** No preferred supplier match will be performed.
773 ENoPreferredSupplierMatch,
775 /** Plugins from all suppliers will be returned, but those from the preferred supplier will be first in the list.
777 EPreferredSupplierPluginsFirstInList,
779 /** Only plugins from the preferred supplier will be returned.
781 EOnlyPreferredSupplierPluginsReturned
784 Describes the type of media ID match to be performed on the plugins return from
787 enum TMediaIdMatchType
790 /** No media ID match will be performed.
794 /** All plugins that support the media ID supplied will be returned, even those that support
795 other media IDs. For example, if an audio plugin is requested, plugins that support
796 audio and video will also be returned.
800 /** Only plugins that support the exact media IDs supplied will be returned. For example, if an
801 audio plugin is requested, plugins that only support audio will be returned
802 (ie. no audio/video plugins).
804 EAllowOnlySuppliedMediaIds
810 Destructor. Resets and destroys all member data.
814 virtual ~CMMFPluginSelectionParameters();
818 Sets the preferred supplier of the plugin.
820 @param aPreferredSupplier
821 The preferred supplier of the plugin.
823 The type of match to be made.
827 IMPORT_C void SetPreferredSupplierL(const TDesC& aPreferredSupplier, TPreferredSupplierMatchType aMatchType);
830 Sets the media IDs that must be supported by the plugin, for example audio, video etc.
833 An array of the media IDs that the selected plugins must support.
835 The type of match to be made.
839 IMPORT_C void SetMediaIdsL(const RArray<TUid>& aMediaIds, TMediaIdMatchType aMatchType);
842 Returns the preferred supplier. If no preferred supplier has been set, a blank
843 string will be returned.
845 @return The preferred supplier
848 IMPORT_C const TDesC& PreferredSupplier() const;
851 Returns the type of preferred supplier match to perform.
853 @return The preferred supplier match type.
856 IMPORT_C TPreferredSupplierMatchType PreferredSupplierMatchType() const;
859 Returns the list of media IDs that must be supported by the plugin.
861 @return The list of media IDs.
865 IMPORT_C const RArray<TUid>& MediaIds() const;
868 Returns the type of preferred supplier match to perform.
870 @return The preferred supplier match type.
874 IMPORT_C TMediaIdMatchType MediaIdMatchType() const;
877 Returns the uid of the interface to be searched for plugin matches.
879 @return The interface uid.
883 IMPORT_C TUid InterfaceUid() const;
888 Protected constructor.
890 Defaults to setting the TPreferredSupplierMatchType enum to ENoPreferredSupplierMatch and TMediaIdMatchType
893 @param aPluginInterfaceUid
894 The plugin's interface UID.
896 CMMFPluginSelectionParameters(TUid aPluginInterfaceUid);
899 Tests whether the specified media is supported by the plugin.
904 @return A boolean indicating if the specified media is supported by the plugin. ETrue if the specified
905 media is supported by the plugin. EFalse if the specified media is not supported by the plugin.
907 TBool CheckMediaIdSupportL(const CMMFPluginImplementationInformation& aPlugin) const;
909 TUid iPluginInterfaceUid;
910 HBufC* iPreferredSupplier;
911 TPreferredSupplierMatchType iPreferredSupplierMatchType;
912 RArray<TUid> iMediaIds;
913 TMediaIdMatchType iMediaIdMatchType;
919 Defines the format support required.
921 On construction, the selection parameters are blank, causing all plugins to be returned.
926 class CMMFFormatSelectionParameters : public CBase
930 Describes the type of match to be performed.
931 The match types are mutually exclusive.
936 /** All plugins will be selected. This is the default option.
940 /** The match will be based on a file extension.
944 /** The match will be based on a mime type.
948 /** The match will be based on a header data.
956 The match will be based on Uri details.
964 Allocates and constructs a new format selection parameter object with blank parameters.
968 @return A new format selection parameter object.
970 IMPORT_C static CMMFFormatSelectionParameters* NewL();
973 Allocates and constructs a new format selection parameter object with blank parameters, placing it on the
976 @return A new format selection parameter object.
978 IMPORT_C static CMMFFormatSelectionParameters* NewLC();
981 Allocates and constructs a new format selection parameter object with the specified parameters.
984 The required parameters.
985 @return A new format selection parameter object.
987 static CMMFFormatSelectionParameters* NewL(const CMMFFormatSelectionParameters& aParams);
990 Sets this object to match to a file extension.
992 aFileName can be a full filename or just an extension. If there is no dot in the filename
993 and it is 5 characters or less in length then it is assumed to be an extension. If the first
994 character of the filename is a dot, it assumed to be an extension. Otherwise, the filename
995 is parsed using TParse to reveal the extension.
997 Once the extension has been extracted, it is converted from unicode to utf8 and copied into
1001 The file name to be matched. Must include the extension.
1005 IMPORT_C void SetMatchToFileNameL(const TDesC& aFileName);
1008 Sets this object to match to a file extension specified by a URI
1010 Once the extension has been extracted, it is copied into iMatchData.
1013 The URI containing the file name to be matched. Must include the extension.
1017 IMPORT_C void SetMatchToUriL(const TDesC& aUri);
1023 Sets this object to match to uri scheme and file extension specified by a URI.
1025 The Uri scheme and extension are saved in iMatchReqData. Further,iMatchData contains uri extension,
1026 iMatchUriScheme contains uri scheme.
1029 The URI containing the scheme and uri extension to be matched.
1032 IMPORT_C void SetMatchToUriSupportL(const TDesC& aUri);
1035 Sets this object to match to a MIME type.
1038 The mime type to match.
1042 IMPORT_C void SetMatchToMimeTypeL(const TDesC8& aMimeType);
1045 Sets this object to match to a pattern in header data.
1048 The header of the file in question. This header data will be matched
1049 against the match patterns provided by the plugins.
1053 IMPORT_C void SetMatchToHeaderDataL(const TDesC8& aHeaderData);
1056 Returns the data used to perform the plugin match.
1058 @return The match data.
1062 IMPORT_C const TDesC8& MatchData() const;
1068 Returns the uri scheme used to perform the plugin match.
1070 @return The uri scheme.
1073 IMPORT_C const TDesC8& MatchUriScheme() const;
1076 Returns the type of the data used to perform the plugin match.
1078 @return The match data type.
1082 IMPORT_C TMatchDataType MatchDataType() const;
1087 virtual ~CMMFFormatSelectionParameters();
1091 Protected constructor.
1093 CMMFFormatSelectionParameters();
1094 void ConstructL(const CMMFFormatSelectionParameters& aParams);
1097 CMatchData* iMatchReqData;
1098 TMatchDataType iMatchDataType;
1107 Contains the parameters used to select controller plugins from the ECOM registry.
1111 class CMMFControllerPluginSelectionParameters : public CMMFPluginSelectionParameters
1116 Constructs a new controller selection parameters object.
1118 @return The new object created.
1122 IMPORT_C static CMMFControllerPluginSelectionParameters* NewL();
1125 Construct a new controller selection parameters object.
1127 @return The new object created. Note that the new object will be left on the cleanup stack.
1131 IMPORT_C static CMMFControllerPluginSelectionParameters* NewLC();
1134 Sets the play format support required.
1137 The play formats supported by the controller plugins will only be retrieved if
1138 this method is called. To get all the play formats supported by the system, call this
1139 with a 'blank' CMMFFormatSelectionParameters object.
1141 @param aRequiredSupport
1142 The play format support required.
1146 IMPORT_C void SetRequiredPlayFormatSupportL(const CMMFFormatSelectionParameters& aRequiredSupport);
1149 Sets the record format support required.
1152 The record formats supported by the controller plugins will only be retrieved if
1153 this method is called. To get all the record formats supported by the system, call this
1154 with a 'blank' CMMFFormatSelectionParameters object.
1156 @param aRequiredSupport
1157 The record format support required.
1159 @return The new object created.
1163 IMPORT_C void SetRequiredRecordFormatSupportL(const CMMFFormatSelectionParameters& aRequiredSupport);
1166 Retrieves all controller plugins that support the requirements of the caller.
1168 @param aImplementations
1169 After this method returns, this array will contain all the
1170 controller plugins that support the caller's requirements.
1171 Note: The array will be emptied by this method.
1175 IMPORT_C virtual void ListImplementationsL(RMMFControllerImplInfoArray& aImplementations) const;
1180 virtual ~CMMFControllerPluginSelectionParameters();
1182 CMMFControllerPluginSelectionParameters();
1183 void MatchImplementationToSelectParamsL(RMMFControllerImplInfoArray& aImplementations, const CMMFControllerImplementationInformation& aPlugin, TInt& aArrayPos) const;
1184 TInt CheckPreferredSupplierL(RMMFControllerImplInfoArray& aImplementations, const CMMFControllerImplementationInformation& aPlugin) const;
1185 TBool CheckFormatSupportL(CMMFFormatSelectionParameters* aSelectParams, const RMMFFormatImplInfoArray& aFormats) const;
1187 Checks the given Controller for uri support. Uri support may be there
1188 if either requiredscheme or extension matches with that given controller
1190 @param aSelectParams
1191 Describes the selection parameter which a controller needs to
1192 support in order to be selected
1195 The controller plugin which is checked for uri support
1198 The play or record formats looked for extension match
1200 TBool CheckUriSupport(CMMFFormatSelectionParameters* aSelectParams, CMMFControllerImplementationInformation* aPlugin, const RMMFFormatImplInfoArray& aFormats) const;
1204 The required play format support
1206 CMMFFormatSelectionParameters* iRequiredPlayFormatSupport;
1209 The required record format support
1211 CMMFFormatSelectionParameters* iRequiredRecordFormatSupport;
1218 Contains the parameters used to select controller plugins which support SecureDRM model
1219 from the ECOM registry. Controller plugins which support SecureDRM model allow play back of DRM-protected
1220 content by client processes without DRM capability. In such case the controller will be loaded in a separate secure DRM process.
1222 class CMMFControllerSecureDrmPluginSelectionParameters : public CMMFControllerPluginSelectionParameters
1227 Constructs a new controller selection parameters object.
1229 @return The new object created.
1231 IMPORT_C static CMMFControllerSecureDrmPluginSelectionParameters* NewL();
1234 Construct a new controller selection parameters object.
1236 @return The new object created. Note that the new object will be left on the cleanup stack.
1238 IMPORT_C static CMMFControllerSecureDrmPluginSelectionParameters* NewLC();
1241 Retrieves all controller plugins that support SecureDRM model and the requirements of the caller.
1243 @param aImplementations
1244 After this method returns, this array will contain all the
1245 controller plugins that support the caller's requirements.
1246 Note: The array will be emptied by this method and SecureDRM model.
1248 IMPORT_C virtual void ListImplementationsL(RMMFControllerImplInfoArray& aImplementations) const;
1253 virtual ~CMMFControllerSecureDrmPluginSelectionParameters() {};
1255 CMMFControllerSecureDrmPluginSelectionParameters();
1262 Abstract class used to contain the parameters used to select format plugins from the ECOM registry.
1265 The classes CMMFFormatEncodePluginSelectionParamters and CMMFFormatDecodePluginSelectionParameters
1266 should be used to list and select format plugin implementations.
1270 class CMMFFormatPluginSelectionParameters : public CMMFPluginSelectionParameters
1275 Retrieves all format plugins that support the requirements of the caller.
1277 @param aImplementations
1278 After this function returns, this array will contain all the
1279 format plugins that support the caller's requirements.
1280 Note: The array will be emptied by this method.
1284 IMPORT_C void ListImplementationsL(RMMFFormatImplInfoArray& aImplementations) const;
1287 Sets the format support required.
1289 @param aRequiredSupport
1290 The format support required.
1294 IMPORT_C void SetRequiredFormatSupportL(const CMMFFormatSelectionParameters& aRequiredSupport);
1299 virtual ~CMMFFormatPluginSelectionParameters();
1302 Protected constructor.
1304 CMMFFormatPluginSelectionParameters(TUid aInterfaceUid);
1306 void MatchImplementationToSelectParamsL(RMMFFormatImplInfoArray& aImplementations, const CMMFFormatImplementationInformation& aPlugin, TInt& aArrayPos) const;
1307 TInt CheckPreferredSupplierL(RMMFFormatImplInfoArray& aImplementations, const CMMFFormatImplementationInformation& aPlugin) const;
1308 TBool CheckFormatSupportL(const CMMFFormatImplementationInformation& aPlugin) const;
1311 The format support required
1313 CMMFFormatSelectionParameters* iRequiredFormatSupport;
1320 Class used to list and select plugins implementing the CMMFFormatEncode interface.
1324 class CMMFFormatEncodePluginSelectionParameters : public CMMFFormatPluginSelectionParameters
1329 Construct a new format encode selection parameters object.
1331 @return The new object created.
1335 IMPORT_C static CMMFFormatEncodePluginSelectionParameters* NewL();
1338 Constructs a new format encode selection parameters object.
1340 @return The new object created. Note that the new object will be left on the cleanup stack.
1344 IMPORT_C static CMMFFormatEncodePluginSelectionParameters* NewLC();
1347 Protected constructor.
1349 CMMFFormatEncodePluginSelectionParameters();
1357 Class used to list and select plugins implementing the CMMFFormatDecode interface.
1361 class CMMFFormatDecodePluginSelectionParameters : public CMMFFormatPluginSelectionParameters
1366 Constructs a new format decode selection parameters object.
1368 @return The new object created.
1372 IMPORT_C static CMMFFormatDecodePluginSelectionParameters* NewL();
1375 Constructs a new format decode selection parameters object.
1377 @return The new object created. Note that the new object will be left on the cleanup stack.
1381 IMPORT_C static CMMFFormatDecodePluginSelectionParameters* NewLC();
1384 Protected constructor.
1386 CMMFFormatDecodePluginSelectionParameters();
1395 Template class CleanupResetAndDestroy to clean up the array
1396 of implementation information from the cleanup stack.
1400 class CleanupResetAndDestroy
1404 Puts an item on the cleanup stack.
1407 The implementation information to be put on the cleanup stack.
1409 inline static void PushL(T& aRef);
1411 static void ResetAndDestroy(TAny *aPtr);
1414 inline void CleanupResetAndDestroyPushL(T& aRef);
1416 inline void CleanupResetAndDestroy<T>::PushL(T& aRef)
1417 {CleanupStack::PushL(TCleanupItem(&ResetAndDestroy,&aRef));}
1419 void CleanupResetAndDestroy<T>::ResetAndDestroy(TAny *aPtr)
1420 {(STATIC_CAST(T*,aPtr))->ResetAndDestroy();}
1422 inline void CleanupResetAndDestroyPushL(T& aRef)
1423 {CleanupResetAndDestroy<T>::PushL(aRef);}