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 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".
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;
57 Interface to be implemented by customers of the class TaggedDataParser.
59 class MTaggedDataParserClient
62 virtual void ProcessTaggedDataL(const TDesC8& aTag, const TDesC8& aData) = 0;
68 Utility class used to parse data separated by xml-style tags.
70 class TaggedDataParser
75 Splits aData into xml-style tags and values, and gets aClient to process each tag/value pair.
77 static void ParseTaggedDataL(const TDesC8& aData, MTaggedDataParserClient& aClient);
80 Converts a string to a uid. If the string begin with "0x" it will be parsed as Hex, else Decimal.
82 static void ConvertTextToUidL(const TDesC8& aData, TUid& aUid);
85 Converts a string to a TUint. The string must begin with "0x" and be 10 characters long,
86 otherwise it is considered corrupt.
88 static void ConvertTextToTUintL(const TDesC8& aData, TUint& aUid);
99 Abstract class that contains basic information about ECom Multimedia plugins.
104 class CMMFPluginImplementationInformation : public CBase
109 Returns the uid of this particular plugin implementation.
110 This is the UID used to instantiate this multimedia plugin.
112 @return The implementation uid.
116 IMPORT_C TUid Uid() const;
119 Returns the display name of this plugin implementation.
121 @return The display name.
125 IMPORT_C const TDesC& DisplayName() const;
128 Returns the name of the supplier of this plugin implementation, e.g. "Symbian".
130 @return The plugin supplier.
134 IMPORT_C const TDesC& Supplier() const;
137 Returns the version number of this plugin.
139 @return The version number.
143 IMPORT_C TInt Version() const;
146 Returns the array of media IDs supported by this plugin.
148 The media ID can be used by clients to determine whether the plugin supports audio or
149 video data (or both). A UID is used for the media ID to provide future extensibility.
151 @return The array of media IDs.
155 IMPORT_C const RArray<TUid>& SupportedMediaIds() const;
158 Tests whether this plugin was supplied by aSupplier.
161 The required supplier.
163 @return A boolean indicating if this plugin was supplied by aSupplier. ETrue if this plugin was supplied
164 by aSupplier, EFalse if not.
168 IMPORT_C TBool SupportsSupplier(const TDesC& aSupplier) const;
171 Tests whether this plugin supports aMediaId.
174 The required media id.
176 @return A boolean indicating if the plugin supports aMediaId. ETrue if this plugin supports aMediaId, EFalse if not.
180 IMPORT_C TBool SupportsMediaId(TUid aMediaId) const;
185 virtual ~CMMFPluginImplementationInformation();
192 CMMFPluginImplementationInformation();
195 Sets the supplier. Takes a copy of aData.
197 void SetSupplierL(const TDesC8& aData);
200 Adds a media id. aData is parsed to find the uid of the media id to be added.
202 void AddMediaIdL(const TDesC8& aData);
207 The UID of this plugin.
212 The display name of this plugin.
217 The supplier of this plugin.
222 The version number of this plugin.
227 The media ids supported by this plugin.
229 RArray<TUid> iMediaIds;
236 Contains format support information retrieved from the ECom registry.
238 An object of this type may describe either a concrete format plugin (ie a CMMFFormatEncode or a
239 CMMFFormatDecode implementation) or a format supported by a controller plugin.
241 The object is created using a CImplementationInformation object retrieved from the ECom registry.
242 All relevant data is copied out of the CImplementationInformation object, and its opaque data is
243 parsed to provide the supplier, supported media ids, supported mime types, supported file extensions,
244 and supported header data matches.
246 Notes for Format Plugin developers:
248 The opaque data section of the ECom plugin resource file must be in the format:
250 opaque_data = "<?>Data 1<?>Data 2<?>Data 3<?>Data 4[...]<?>Data N";
252 The <?> preceding the data determines the meaning of the data. The following are the possible tags:
259 <c> - Custom Interfaces
261 UIDs must always be in hex in the format '0x12345678', must include the '0x' and be 10 characters long
266 class CMMFFormatImplementationInformation : public CMMFPluginImplementationInformation, MTaggedDataParserClient
270 Constructs a new format implementation information object.
273 The ECOM implementation information
275 @return The new object created.
279 static CMMFFormatImplementationInformation* NewL(const CImplementationInformation& aImplInfo);
282 Constructs a new format implementation information object.
285 The ECOM implementation information
287 @return The new object created. Note that this will be on the cleanup stack.
291 static CMMFFormatImplementationInformation* NewLC(const CImplementationInformation& aImplInfo);
296 virtual ~CMMFFormatImplementationInformation();
299 Returns the array of supported file extensions.
301 @return The array of file extensions.
304 IMPORT_C const CDesC8Array& SupportedFileExtensions() const;
307 Returns the array of supported mime types.
309 @return The array of mime types.
313 IMPORT_C const CDesC8Array& SupportedMimeTypes() const;
316 Returns the array of supported header data matches.
318 @return The array of header data.
321 IMPORT_C const CDesC8Array& SupportedHeaderData() const;
324 Tests whether this format provides support for the specified file extension, aFileExtension.
326 @param aFileExtension
327 The requested file extension. Must be the extension only, and contain the dot '.'
329 @return A boolean indicating if the specified file extension is supported. ETrue if this format provides
330 the required support, EFalse if it does not.
334 IMPORT_C TBool SupportsFileExtension(const TDesC8& aFileExtension) const;
337 Tests whether this format provides support for aMimeType.
340 The requested mime type.
342 @return A boolean indicating if the format is supported. ETrue if this format provides the required support, EFalse if not.
346 IMPORT_C TBool SupportsMimeType(const TDesC8& aMimeType) const;
349 Tests whether this format provides support for aHeaderData.
350 aHeaderData is searched for each chunk supported by this format.
353 The requested header data.
355 @return A boolean indicating if aHeaderData is supported. ETrue if this format provides the required support, EFalse if not.
359 IMPORT_C TBool SupportsHeaderDataL(const TDesC8& aHeaderData) const;
362 Tests whether this format provides support for Custom Interfaces.
364 @return A boolean indicating if Custom Interfaces are supported. ETrue if this format provides the required support, EFalse if not.
366 IMPORT_C TBool SupportsCustomInterfaces() const;
373 CMMFFormatImplementationInformation();
376 2nd phase constructor
378 void ConstructL(const CImplementationInformation& aImplInfo);
381 Adds a file extension to the array of extensions supported by this format.
383 void AddFileExtensionL(const TDesC8& aData);
386 Adds a mime type to the array of types supported by this format.
388 void AddMimeTypeL(const TDesC8& aData);
391 Adds a chunk of header data to the array of chunks supported by this format.
393 void AddHeaderDataL(const TDesC8& aData);
396 from MTaggedDataParserClient
398 void ProcessTaggedDataL(const TDesC8& aTag, const TDesC8& aData);
403 CMMFFormatImplementationInformation body
413 Contains controller plugin information retrieved from the ECom registry.
415 The object is created using a CImplementationInformation object retrieved from the ECom registry.
416 All relevant data is copied out of the CImplementationInformation object, and its opaque data is
417 parsed to provide the supplier, supported media IDs.
419 Notes for Format Plugin developers:
420 The exact formats supported by the controller plugin are calculated by:
422 1. The formats supported by the controller plugin itself must be declared in separate entries in the
423 controller plugin resource file. Two interface UIDs should be defined by the plugin writer - one
424 for the play formats supported, the other for the record formats supported. The play formats are
425 then listed as implementations of the play format interface uid, and likewise the record formats.
427 2. Format plugins (CMMFFormatEncode and CMMFFormatDecode) declare which controller plugin they
428 extend. ECom is search for the format plugins that extend the controller plugin, and they
429 are added to the list.
431 The opaque data section of the ECom plugin resource file must be in the format:
434 opaque_data = "<?>Data 1<?>Data 2<?>Data 3<?>Data 4[...]<?>Data N";
436 The <?> preceding the data determines the meaning of the data. The following are the possible tags:
438 <s> - Supplier - must be only one
440 <p> - UID of play format 'interface' - must be only one
441 <r> - UID of record format 'interface' - must be only one
443 UIDs must always be in hex in the format '0x12345678', must include the '0x' and be 10 characters long.
448 class CMMFControllerImplementationInformation : public CMMFPluginImplementationInformation, MTaggedDataParserClient
453 Constructs a new controller implementation information object.
456 The ECOM implementation information.
458 @return The new object created.
464 static CMMFControllerImplementationInformation* NewL(const CImplementationInformation& aImplInfo);
467 Constructs a new controller implementation information object.
470 The new object will be on the cleanup stack.
473 The ECOM implementation information
475 @return The new object created.
481 static CMMFControllerImplementationInformation* NewLC(const CImplementationInformation& aImplInfo);
484 Constructs a new controller implementation information object.
487 The Uid of the controller to obtain controller implementation information
489 @return The new object created.
493 IMPORT_C static CMMFControllerImplementationInformation* NewL(TUid aUid);
500 ~CMMFControllerImplementationInformation();
503 Returns the array of play formats supported by this controller.
505 @return The play formats supported.
509 IMPORT_C const RMMFFormatImplInfoArray& PlayFormats() const;
512 Returns the array of record formats supported by this controller.
514 @return The record formats supported.
518 IMPORT_C const RMMFFormatImplInfoArray& RecordFormats() const;
521 Returns the heap space required by this controller.
523 @return The heap space required.
527 IMPORT_C TUint HeapSpaceRequired() const;
530 Queries the ECom registry for the play formats supported.
534 void GetPlayFormatsL();
537 Queries the ECom registry for the record formats supported.
541 void GetRecordFormatsL();
544 Returns the uri schemes of this plugin.
546 @return The array of uri schemes.
550 IMPORT_C const CDesC8Array& SupportedUriSchemes() const;
553 Tests whether the plugin supports aUriScheme.
556 The required Uri Scheme.
558 @return A boolean indicating if the plugin supports aUriScheme. ETrue if this plugin supports aUriScheme, EFalse if not.
562 IMPORT_C TBool SupportsUriScheme(const TDesC8& aUriScheme) const;
565 Tests whether the controller plugin supports url
567 @return A boolean indicating if the plugin supports url. ETrue for uri supporting controller, EFalse if not.
571 IMPORT_C TBool SupportsNetworkCapability() const;
574 Sets the uri priority of this controller
577 The Uri priority to be assigned.
581 IMPORT_C void SetUriPriority(TInt aUriPriority);
584 Retrieves the uri priority of this controller.
585 Higher priority implies greater number. ie UriPriority() returning 3
586 has higher prioirty than UriPriority() returning 1.
588 @return The assigned Uri priority.
592 IMPORT_C TInt UriPriority() const;
595 Check whether the controller plugin supports secure DRM process mode
597 @return A boolean indicating if the plugin supports secure DRM process mode.
598 ETrue for secure DRM process mode supporting controller, EFalse if not.
602 IMPORT_C TBool SupportsSecureDRMProcessMode() const;
611 CMMFControllerImplementationInformation();
614 2nd phase constructor.
618 void ConstructL(const CImplementationInformation& aImplInfo);
621 Parses aData to get the collection UID of the play formats supported by this controller.
625 void SetPlayFormatCollectionUidL(const TDesC8& aData);
628 Parses aData to get the collection UID of the record formats supported by this controller.
632 void SetRecordFormatCollectionUidL(const TDesC8& aData);
635 Parses aData to get the size of the stack the controller requires.
639 void SetHeapSizeL(const TDesC8& aData);
642 From MTaggedDataParserClient.
644 void ProcessTaggedDataL(const TDesC8& aTag, const TDesC8& aData);
647 Queries the ECom registry for:
648 - all registry entries with an interface UID of aFormatCollectionUid
649 - all format plugins with an interface UID of aFormatPluginCollectionUid (ie CMMFFormatEncode
650 or CMMFFormatDecode) that have the UID of this controller plugin in the default_data field
651 of their ECom resource file.
653 CMMFFormatImplementationInformation objects are created for each entry returned, and appended to
656 @param aFormatCollectionUid
658 @param aFormatPluginCollectionUid
667 void GetFormatsL(TUid aFormatCollectionUid, TUid aFormatPluginCollectionUid, RMMFFormatImplInfoArray& aFormatArray);
670 Creates CMMFFormatImplementationInformation objects for all CImplementationInformation objects
671 in aEcomArray. Any corrupt objects are ignored. The objects created are added to aFormatArray.
682 void AddFormatsSwallowCorruptL(RImplInfoPtrArray& aEcomArray, RMMFFormatImplInfoArray& aFormatArray);
685 Sets the Uri Scheme found in opaque data
688 Gives the uri scheme supported by the controller
692 void SetUriSchemeL(const TDesC8& aUriScheme);
695 Sets the Network capability found in opaque data
697 @param aNetworkCapable
698 Declares the incapability to support uri if matches to 'yes'.
699 If this is the case, iIsNetworkCtrl is set to EFalse
703 void SetNetworkCapabilityL(const TDesC8& aNetworkCapable);
708 The play formats supported by this controller.
710 RMMFFormatImplInfoArray iPlayFormats;
713 The record formats supported by this controller.
715 RMMFFormatImplInfoArray iRecordFormats;
718 The interface uid of the resource file definitions of the play formats supported directly by this controller.
720 TUid iPlayFormatCollectionUid;
723 The interface uid of the resource file definitions of the record formats supported directly by this controller.
725 TUid iRecordFormatCollectionUid;
728 The heap space required by this controller
730 TUint iHeapSpaceRequired;
733 The Uri scheme supported by this plugin
735 CDesC8Array* iUriSchemes;
738 The uri priority acquired by this controller
743 The uri support provided by this controller
745 TBool iIsNetworkCtrl;
748 Secure DRM process model supported by this controller
750 TBool iSupportsSecureDRMProcessMode;
757 Contains the parameters used to select mmf plugins from the ECOM registry.
762 class CMMFPluginSelectionParameters : public CBase
767 Describes the type of preferred supplier match to be performed on the plugins return from
770 enum TPreferredSupplierMatchType
773 /** No preferred supplier match will be performed.
775 ENoPreferredSupplierMatch,
777 /** Plugins from all suppliers will be returned, but those from the preferred supplier will be first in the list.
779 EPreferredSupplierPluginsFirstInList,
781 /** Only plugins from the preferred supplier will be returned.
783 EOnlyPreferredSupplierPluginsReturned
786 Describes the type of media ID match to be performed on the plugins return from
789 enum TMediaIdMatchType
792 /** No media ID match will be performed.
796 /** All plugins that support the media ID supplied will be returned, even those that support
797 other media IDs. For example, if an audio plugin is requested, plugins that support
798 audio and video will also be returned.
802 /** Only plugins that support the exact media IDs supplied will be returned. For example, if an
803 audio plugin is requested, plugins that only support audio will be returned
804 (ie. no audio/video plugins).
806 EAllowOnlySuppliedMediaIds
812 Destructor. Resets and destroys all member data.
816 virtual ~CMMFPluginSelectionParameters();
820 Sets the preferred supplier of the plugin.
822 @param aPreferredSupplier
823 The preferred supplier of the plugin.
825 The type of match to be made.
829 IMPORT_C void SetPreferredSupplierL(const TDesC& aPreferredSupplier, TPreferredSupplierMatchType aMatchType);
832 Sets the media IDs that must be supported by the plugin, for example audio, video etc.
835 An array of the media IDs that the selected plugins must support.
837 The type of match to be made.
841 IMPORT_C void SetMediaIdsL(const RArray<TUid>& aMediaIds, TMediaIdMatchType aMatchType);
844 Returns the preferred supplier. If no preferred supplier has been set, a blank
845 string will be returned.
847 @return The preferred supplier
850 IMPORT_C const TDesC& PreferredSupplier() const;
853 Returns the type of preferred supplier match to perform.
855 @return The preferred supplier match type.
858 IMPORT_C TPreferredSupplierMatchType PreferredSupplierMatchType() const;
861 Returns the list of media IDs that must be supported by the plugin.
863 @return The list of media IDs.
867 IMPORT_C const RArray<TUid>& MediaIds() const;
870 Returns the type of preferred supplier match to perform.
872 @return The preferred supplier match type.
876 IMPORT_C TMediaIdMatchType MediaIdMatchType() const;
879 Returns the uid of the interface to be searched for plugin matches.
881 @return The interface uid.
885 IMPORT_C TUid InterfaceUid() const;
890 Protected constructor.
892 Defaults to setting the TPreferredSupplierMatchType enum to ENoPreferredSupplierMatch and TMediaIdMatchType
895 @param aPluginInterfaceUid
896 The plugin's interface UID.
898 CMMFPluginSelectionParameters(TUid aPluginInterfaceUid);
901 Tests whether the specified media is supported by the plugin.
906 @return A boolean indicating if the specified media is supported by the plugin. ETrue if the specified
907 media is supported by the plugin. EFalse if the specified media is not supported by the plugin.
909 TBool CheckMediaIdSupportL(const CMMFPluginImplementationInformation& aPlugin) const;
911 TUid iPluginInterfaceUid;
912 HBufC* iPreferredSupplier;
913 TPreferredSupplierMatchType iPreferredSupplierMatchType;
914 RArray<TUid> iMediaIds;
915 TMediaIdMatchType iMediaIdMatchType;
921 Defines the format support required.
923 On construction, the selection parameters are blank, causing all plugins to be returned.
928 class CMMFFormatSelectionParameters : public CBase
932 Describes the type of match to be performed.
933 The match types are mutually exclusive.
938 /** All plugins will be selected. This is the default option.
942 /** The match will be based on a file extension.
946 /** The match will be based on a mime type.
950 /** The match will be based on a header data.
958 The match will be based on Uri details.
966 Allocates and constructs a new format selection parameter object with blank parameters.
970 @return A new format selection parameter object.
972 IMPORT_C static CMMFFormatSelectionParameters* NewL();
975 Allocates and constructs a new format selection parameter object with blank parameters, placing it on the
978 @return A new format selection parameter object.
980 IMPORT_C static CMMFFormatSelectionParameters* NewLC();
983 Allocates and constructs a new format selection parameter object with the specified parameters.
986 The required parameters.
987 @return A new format selection parameter object.
989 static CMMFFormatSelectionParameters* NewL(const CMMFFormatSelectionParameters& aParams);
992 Sets this object to match to a file extension.
994 aFileName can be a full filename or just an extension. If there is no dot in the filename
995 and it is 5 characters or less in length then it is assumed to be an extension. If the first
996 character of the filename is a dot, it assumed to be an extension. Otherwise, the filename
997 is parsed using TParse to reveal the extension.
999 Once the extension has been extracted, it is converted from unicode to utf8 and copied into
1003 The file name to be matched. Must include the extension.
1007 IMPORT_C void SetMatchToFileNameL(const TDesC& aFileName);
1010 Sets this object to match to a file extension specified by a URI
1012 Once the extension has been extracted, it is copied into iMatchData.
1015 The URI containing the file name to be matched. Must include the extension.
1019 IMPORT_C void SetMatchToUriL(const TDesC& aUri);
1025 Sets this object to match to uri scheme and file extension specified by a URI.
1027 The Uri scheme and extension are saved in iMatchReqData. Further,iMatchData contains uri extension,
1028 iMatchUriScheme contains uri scheme.
1031 The URI containing the scheme and uri extension to be matched.
1034 IMPORT_C void SetMatchToUriSupportL(const TDesC& aUri);
1037 Sets this object to match to a MIME type.
1040 The mime type to match.
1044 IMPORT_C void SetMatchToMimeTypeL(const TDesC8& aMimeType);
1047 Sets this object to match to a pattern in header data.
1050 The header of the file in question. This header data will be matched
1051 against the match patterns provided by the plugins.
1055 IMPORT_C void SetMatchToHeaderDataL(const TDesC8& aHeaderData);
1058 Returns the data used to perform the plugin match.
1060 @return The match data.
1064 IMPORT_C const TDesC8& MatchData() const;
1070 Returns the uri scheme used to perform the plugin match.
1072 @return The uri scheme.
1075 IMPORT_C const TDesC8& MatchUriScheme() const;
1078 Returns the type of the data used to perform the plugin match.
1080 @return The match data type.
1084 IMPORT_C TMatchDataType MatchDataType() const;
1089 virtual ~CMMFFormatSelectionParameters();
1093 Protected constructor.
1095 CMMFFormatSelectionParameters();
1096 void ConstructL(const CMMFFormatSelectionParameters& aParams);
1099 CMatchData* iMatchReqData;
1100 TMatchDataType iMatchDataType;
1109 Contains the parameters used to select controller plugins from the ECOM registry.
1113 class CMMFControllerPluginSelectionParameters : public CMMFPluginSelectionParameters
1118 Constructs a new controller selection parameters object.
1120 @return The new object created.
1124 IMPORT_C static CMMFControllerPluginSelectionParameters* NewL();
1127 Construct a new controller selection parameters object.
1129 @return The new object created. Note that the new object will be left on the cleanup stack.
1133 IMPORT_C static CMMFControllerPluginSelectionParameters* NewLC();
1136 Sets the play format support required.
1139 The play formats supported by the controller plugins will only be retrieved if
1140 this method is called. To get all the play formats supported by the system, call this
1141 with a 'blank' CMMFFormatSelectionParameters object.
1143 @param aRequiredSupport
1144 The play format support required.
1148 IMPORT_C void SetRequiredPlayFormatSupportL(const CMMFFormatSelectionParameters& aRequiredSupport);
1151 Sets the record format support required.
1154 The record formats supported by the controller plugins will only be retrieved if
1155 this method is called. To get all the record formats supported by the system, call this
1156 with a 'blank' CMMFFormatSelectionParameters object.
1158 @param aRequiredSupport
1159 The record format support required.
1161 @return The new object created.
1165 IMPORT_C void SetRequiredRecordFormatSupportL(const CMMFFormatSelectionParameters& aRequiredSupport);
1168 Retrieves all controller plugins that support the requirements of the caller.
1170 @param aImplementations
1171 After this method returns, this array will contain all the
1172 controller plugins that support the caller's requirements.
1173 Note: The array will be emptied by this method.
1177 IMPORT_C virtual void ListImplementationsL(RMMFControllerImplInfoArray& aImplementations) const;
1182 virtual ~CMMFControllerPluginSelectionParameters();
1184 CMMFControllerPluginSelectionParameters();
1185 void MatchImplementationToSelectParamsL(RMMFControllerImplInfoArray& aImplementations, const CMMFControllerImplementationInformation& aPlugin, TInt& aArrayPos) const;
1186 TInt CheckPreferredSupplierL(RMMFControllerImplInfoArray& aImplementations, const CMMFControllerImplementationInformation& aPlugin) const;
1187 TBool CheckFormatSupportL(CMMFFormatSelectionParameters* aSelectParams, const RMMFFormatImplInfoArray& aFormats) const;
1189 Checks the given Controller for uri support. Uri support may be there
1190 if either requiredscheme or extension matches with that given controller
1192 @param aSelectParams
1193 Describes the selection parameter which a controller needs to
1194 support in order to be selected
1197 The controller plugin which is checked for uri support
1200 The play or record formats looked for extension match
1202 TBool CheckUriSupport(CMMFFormatSelectionParameters* aSelectParams, CMMFControllerImplementationInformation* aPlugin, const RMMFFormatImplInfoArray& aFormats) const;
1206 The required play format support
1208 CMMFFormatSelectionParameters* iRequiredPlayFormatSupport;
1211 The required record format support
1213 CMMFFormatSelectionParameters* iRequiredRecordFormatSupport;
1220 Contains the parameters used to select controller plugins which support SecureDRM model
1221 from the ECOM registry. Controller plugins which support SecureDRM model allow play back of DRM-protected
1222 content by client processes without DRM capability. In such case the controller will be loaded in a separate secure DRM process.
1224 class CMMFControllerSecureDrmPluginSelectionParameters : public CMMFControllerPluginSelectionParameters
1229 Constructs a new controller selection parameters object.
1231 @return The new object created.
1233 IMPORT_C static CMMFControllerSecureDrmPluginSelectionParameters* NewL();
1236 Construct a new controller selection parameters object.
1238 @return The new object created. Note that the new object will be left on the cleanup stack.
1240 IMPORT_C static CMMFControllerSecureDrmPluginSelectionParameters* NewLC();
1243 Retrieves all controller plugins that support SecureDRM model and the requirements of the caller.
1245 @param aImplementations
1246 After this method returns, this array will contain all the
1247 controller plugins that support the caller's requirements.
1248 Note: The array will be emptied by this method and SecureDRM model.
1250 IMPORT_C virtual void ListImplementationsL(RMMFControllerImplInfoArray& aImplementations) const;
1255 virtual ~CMMFControllerSecureDrmPluginSelectionParameters() {};
1257 CMMFControllerSecureDrmPluginSelectionParameters();
1260 class CMmfRecognizerUtil; // declared here.
1264 MMF utility class used by MMF recognizer
1265 Maintains an array of CMMFControllerImplementationInformation objects
1266 so that data headers can be speedily matched against.
1267 Updates the array when notified by ECOM of a change to the global
1268 interface implementation registration data.
1270 NONSHARABLE_CLASS( CMmfRecognizerUtil ): public CBase
1275 EMatchNone, //no match
1276 EMatchData, //data match only
1277 EMatchName //suffix and data match
1280 IMPORT_C static void GetMimeTypesL(CDesC8Array* aMimeTypes);
1282 IMPORT_C static CMmfRecognizerUtil* NewL();
1284 ~CMmfRecognizerUtil();
1285 IMPORT_C TMatchLevel GetMimeTypeL(const TDesC& aFileName, const TDesC8& aImageData, TDes8& aMimeType);
1288 CMmfRecognizerUtil();
1301 Abstract class used to contain the parameters used to select format plugins from the ECOM registry.
1304 The classes CMMFFormatEncodePluginSelectionParamters and CMMFFormatDecodePluginSelectionParameters
1305 should be used to list and select format plugin implementations.
1309 class CMMFFormatPluginSelectionParameters : public CMMFPluginSelectionParameters
1314 Retrieves all format plugins that support the requirements of the caller.
1316 @param aImplementations
1317 After this function returns, this array will contain all the
1318 format plugins that support the caller's requirements.
1319 Note: The array will be emptied by this method.
1323 IMPORT_C void ListImplementationsL(RMMFFormatImplInfoArray& aImplementations) const;
1326 Sets the format support required.
1328 @param aRequiredSupport
1329 The format support required.
1333 IMPORT_C void SetRequiredFormatSupportL(const CMMFFormatSelectionParameters& aRequiredSupport);
1338 virtual ~CMMFFormatPluginSelectionParameters();
1341 Protected constructor.
1343 CMMFFormatPluginSelectionParameters(TUid aInterfaceUid);
1345 void MatchImplementationToSelectParamsL(RMMFFormatImplInfoArray& aImplementations, const CMMFFormatImplementationInformation& aPlugin, TInt& aArrayPos) const;
1346 TInt CheckPreferredSupplierL(RMMFFormatImplInfoArray& aImplementations, const CMMFFormatImplementationInformation& aPlugin) const;
1347 TBool CheckFormatSupportL(const CMMFFormatImplementationInformation& aPlugin) const;
1350 The format support required
1352 CMMFFormatSelectionParameters* iRequiredFormatSupport;
1359 Class used to list and select plugins implementing the CMMFFormatEncode interface.
1363 class CMMFFormatEncodePluginSelectionParameters : public CMMFFormatPluginSelectionParameters
1368 Construct a new format encode selection parameters object.
1370 @return The new object created.
1374 IMPORT_C static CMMFFormatEncodePluginSelectionParameters* NewL();
1377 Constructs a new format encode selection parameters object.
1379 @return The new object created. Note that the new object will be left on the cleanup stack.
1383 IMPORT_C static CMMFFormatEncodePluginSelectionParameters* NewLC();
1386 Protected constructor.
1388 CMMFFormatEncodePluginSelectionParameters();
1396 Class used to list and select plugins implementing the CMMFFormatDecode interface.
1400 class CMMFFormatDecodePluginSelectionParameters : public CMMFFormatPluginSelectionParameters
1405 Constructs a new format decode selection parameters object.
1407 @return The new object created.
1411 IMPORT_C static CMMFFormatDecodePluginSelectionParameters* NewL();
1414 Constructs a new format decode selection parameters object.
1416 @return The new object created. Note that the new object will be left on the cleanup stack.
1420 IMPORT_C static CMMFFormatDecodePluginSelectionParameters* NewLC();
1423 Protected constructor.
1425 CMMFFormatDecodePluginSelectionParameters();
1434 Template class CleanupResetAndDestroy to clean up the array
1435 of implementation information from the cleanup stack.
1439 class CleanupResetAndDestroy
1443 Puts an item on the cleanup stack.
1446 The implementation information to be put on the cleanup stack.
1448 inline static void PushL(T& aRef);
1450 static void ResetAndDestroy(TAny *aPtr);
1453 inline void CleanupResetAndDestroyPushL(T& aRef);
1455 inline void CleanupResetAndDestroy<T>::PushL(T& aRef)
1456 {CleanupStack::PushL(TCleanupItem(&ResetAndDestroy,&aRef));}
1458 void CleanupResetAndDestroy<T>::ResetAndDestroy(TAny *aPtr)
1459 {(STATIC_CAST(T*,aPtr))->ResetAndDestroy();}
1461 inline void CleanupResetAndDestroyPushL(T& aRef)
1462 {CleanupResetAndDestroy<T>::PushL(aRef);}