os/mm/mmlibs/mmfw/inc/mmf/ControllerFramework/mmfcontrollerpluginresolver.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// mmf\common\mmfcontrollerpluginresolver.h
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
sl@0
    18
#ifndef MMF_COMMON_MMFCONTROLLERPLUGINRESOLVER_H
sl@0
    19
#define MMF_COMMON_MMFCONTROLLERPLUGINRESOLVER_H
sl@0
    20
sl@0
    21
#include <ecom/ecom.h>
sl@0
    22
#include <e32base.h>
sl@0
    23
#include <apmstd.h>
sl@0
    24
sl@0
    25
/**
sl@0
    26
@publishedAll
sl@0
    27
@released
sl@0
    28
sl@0
    29
Default heap size for the controller thread
sl@0
    30
*/
sl@0
    31
const TUint KMMFDefaultControllerThreadHeapSize = 0x100000; //1MB
sl@0
    32
sl@0
    33
sl@0
    34
class CMMFFormatImplementationInformation;
sl@0
    35
sl@0
    36
/**
sl@0
    37
@publishedAll
sl@0
    38
@released
sl@0
    39
sl@0
    40
Array of CMMFFormatImplementationInformation 
sl@0
    41
*/
sl@0
    42
typedef RPointerArray<CMMFFormatImplementationInformation> RMMFFormatImplInfoArray;
sl@0
    43
sl@0
    44
class CMMFControllerImplementationInformation;
sl@0
    45
sl@0
    46
/**
sl@0
    47
@publishedAll
sl@0
    48
@released
sl@0
    49
sl@0
    50
Array of CMMFControllerImplementationInformation 
sl@0
    51
*/
sl@0
    52
typedef RPointerArray<CMMFControllerImplementationInformation> RMMFControllerImplInfoArray;
sl@0
    53
sl@0
    54
class CMatchData;
sl@0
    55
sl@0
    56
class CDesC8Array;
sl@0
    57
sl@0
    58
/**
sl@0
    59
@publishedAll
sl@0
    60
sl@0
    61
Abstract class that contains basic information about ECom Multimedia plugins.
sl@0
    62
sl@0
    63
@released
sl@0
    64
@since 7.0s
sl@0
    65
*/
sl@0
    66
class CMMFPluginImplementationInformation : public CBase
sl@0
    67
	{
sl@0
    68
public:
sl@0
    69
sl@0
    70
	/**
sl@0
    71
	Returns the uid of this particular plugin implementation.
sl@0
    72
	This is the UID used to instantiate this multimedia plugin.
sl@0
    73
sl@0
    74
	@return The implementation uid.
sl@0
    75
sl@0
    76
	@since  7.0s
sl@0
    77
	*/
sl@0
    78
	IMPORT_C TUid Uid() const;
sl@0
    79
sl@0
    80
	/**
sl@0
    81
	Returns the display name of this plugin implementation.
sl@0
    82
sl@0
    83
	@return The display name.
sl@0
    84
sl@0
    85
	@since  7.0s
sl@0
    86
	*/
sl@0
    87
	IMPORT_C const TDesC& DisplayName() const;
sl@0
    88
sl@0
    89
	/**
sl@0
    90
	Returns the name of the supplier of this plugin implementation, e.g. "Symbian".
sl@0
    91
sl@0
    92
	@return The plugin supplier.
sl@0
    93
sl@0
    94
	@since  7.0s
sl@0
    95
	*/
sl@0
    96
	IMPORT_C const TDesC& Supplier() const;
sl@0
    97
sl@0
    98
	/**
sl@0
    99
	Returns the version number of this plugin.
sl@0
   100
sl@0
   101
	@return The version number.
sl@0
   102
sl@0
   103
	@since 7.0s
sl@0
   104
	*/
sl@0
   105
	IMPORT_C TInt Version() const;
sl@0
   106
sl@0
   107
	/**
sl@0
   108
	Returns the array of media IDs supported by this plugin.
sl@0
   109
	
sl@0
   110
	The media ID can be used by clients to determine whether the plugin supports audio or
sl@0
   111
	video data (or both). A UID is used for the media ID to provide future extensibility.
sl@0
   112
sl@0
   113
	@return The array of media IDs.
sl@0
   114
sl@0
   115
	@since  7.0s
sl@0
   116
	*/
sl@0
   117
	IMPORT_C const RArray<TUid>& SupportedMediaIds() const;
sl@0
   118
sl@0
   119
	/**
sl@0
   120
	Tests whether this plugin was supplied by aSupplier.
sl@0
   121
sl@0
   122
	@param  aSupplier
sl@0
   123
	        The required supplier.
sl@0
   124
sl@0
   125
	@return A boolean indicating if this plugin was supplied by aSupplier. ETrue if this plugin was supplied 
sl@0
   126
	        by aSupplier, EFalse if not.
sl@0
   127
sl@0
   128
	@since 7.0s
sl@0
   129
	*/
sl@0
   130
	IMPORT_C TBool SupportsSupplier(const TDesC& aSupplier) const;
sl@0
   131
sl@0
   132
	/**
sl@0
   133
	Tests whether this plugin supports aMediaId.
sl@0
   134
sl@0
   135
	@param  aMediaId
sl@0
   136
	        The required media id.
sl@0
   137
sl@0
   138
	@return A boolean indicating if the plugin supports aMediaId. ETrue if this plugin supports aMediaId, EFalse if not.
sl@0
   139
sl@0
   140
	@since 7.0s
sl@0
   141
	*/
sl@0
   142
	IMPORT_C TBool SupportsMediaId(TUid aMediaId) const;
sl@0
   143
sl@0
   144
	/**
sl@0
   145
	Destructor.
sl@0
   146
	*/
sl@0
   147
	virtual ~CMMFPluginImplementationInformation();
sl@0
   148
sl@0
   149
protected:
sl@0
   150
sl@0
   151
	/**
sl@0
   152
	Constructor.
sl@0
   153
	*/
sl@0
   154
	CMMFPluginImplementationInformation();
sl@0
   155
sl@0
   156
	/** 
sl@0
   157
	Sets the supplier. Takes a copy of aData.
sl@0
   158
	*/
sl@0
   159
	void SetSupplierL(const TDesC8& aData);
sl@0
   160
sl@0
   161
	/**
sl@0
   162
	Adds a media id. aData is parsed to find the uid of the media id to be added.
sl@0
   163
	*/
sl@0
   164
	void AddMediaIdL(const TDesC8& aData);
sl@0
   165
	
sl@0
   166
protected:
sl@0
   167
sl@0
   168
	/** 
sl@0
   169
	The UID of this plugin. 
sl@0
   170
	*/
sl@0
   171
	TUid iUid;
sl@0
   172
sl@0
   173
	/** 
sl@0
   174
	The display name of this plugin. 
sl@0
   175
	*/
sl@0
   176
	HBufC* iDisplayName;
sl@0
   177
sl@0
   178
	/** 
sl@0
   179
	The supplier of this plugin. 
sl@0
   180
	*/
sl@0
   181
	HBufC* iSupplier;
sl@0
   182
sl@0
   183
	/** 
sl@0
   184
	The version number of this plugin. 
sl@0
   185
	*/
sl@0
   186
	TInt iVersion;
sl@0
   187
sl@0
   188
	/**
sl@0
   189
	The media ids supported by this plugin.
sl@0
   190
	*/
sl@0
   191
	RArray<TUid> iMediaIds;
sl@0
   192
	};
sl@0
   193
sl@0
   194
#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
sl@0
   195
#include <mmf/common/taggeddataparser.h>
sl@0
   196
#endif
sl@0
   197
sl@0
   198
/**
sl@0
   199
@publishedAll
sl@0
   200
sl@0
   201
Interface to be implemented by customers of the class TaggedDataParser.
sl@0
   202
*/
sl@0
   203
class MTaggedDataParserClient
sl@0
   204
	{
sl@0
   205
public:
sl@0
   206
	virtual void ProcessTaggedDataL(const TDesC8& aTag, const TDesC8& aData) = 0;
sl@0
   207
	};
sl@0
   208
sl@0
   209
/**
sl@0
   210
@publishedAll
sl@0
   211
@released
sl@0
   212
sl@0
   213
Contains format support information retrieved from the ECom registry.
sl@0
   214
sl@0
   215
An object of this type may describe either a concrete format plugin (ie a CMMFFormatEncode or a
sl@0
   216
CMMFFormatDecode implementation) or a format supported by a controller plugin.
sl@0
   217
sl@0
   218
The object is created using a CImplementationInformation object retrieved from the ECom registry.
sl@0
   219
All relevant data is copied out of the CImplementationInformation object, and its opaque data is
sl@0
   220
parsed to provide the supplier, supported media ids, supported mime types, supported file extensions,
sl@0
   221
and supported header data matches.
sl@0
   222
sl@0
   223
Notes for Format Plugin developers:
sl@0
   224
@code
sl@0
   225
The opaque data section of the ECom plugin resource file must be in the format:
sl@0
   226
sl@0
   227
opaque_data = "<?>Data 1<?>Data 2<?>Data 3<?>Data 4[...]<?>Data N";
sl@0
   228
sl@0
   229
The <?> preceding the data determines the meaning of the data.  The following are the possible tags:
sl@0
   230
sl@0
   231
	<s> - Supplier
sl@0
   232
	<i> - Media Id
sl@0
   233
	<m> - Mime Type
sl@0
   234
	<e> - File Extension
sl@0
   235
	<h> - Header Data
sl@0
   236
	<c> - Custom Interfaces
sl@0
   237
sl@0
   238
UIDs must always be in hex in the format '0x12345678', must include the '0x' and be 10 characters long
sl@0
   239
@endcode
sl@0
   240
sl@0
   241
@since 7.0s
sl@0
   242
*/
sl@0
   243
class CMMFFormatImplementationInformation : public CMMFPluginImplementationInformation, MTaggedDataParserClient
sl@0
   244
	{
sl@0
   245
public:
sl@0
   246
	/**
sl@0
   247
	Constructs a new format implementation information object.
sl@0
   248
sl@0
   249
	@param  aImplInfo
sl@0
   250
	        The ECOM implementation information
sl@0
   251
sl@0
   252
	@return The new object created.
sl@0
   253
sl@0
   254
	@since 7.0s
sl@0
   255
	*/
sl@0
   256
	static CMMFFormatImplementationInformation* NewL(const CImplementationInformation& aImplInfo);
sl@0
   257
sl@0
   258
	/**
sl@0
   259
	Constructs a new format implementation information object.
sl@0
   260
sl@0
   261
	@param  aImplInfo
sl@0
   262
	        The ECOM implementation information
sl@0
   263
sl@0
   264
	@return The new object created. Note that this will be on the cleanup stack.
sl@0
   265
sl@0
   266
	@since  7.0s
sl@0
   267
	*/
sl@0
   268
	static CMMFFormatImplementationInformation* NewLC(const CImplementationInformation& aImplInfo);
sl@0
   269
sl@0
   270
	/** 
sl@0
   271
	Destructor 
sl@0
   272
	*/
sl@0
   273
	virtual ~CMMFFormatImplementationInformation();
sl@0
   274
sl@0
   275
	/**
sl@0
   276
	Returns the array of supported file extensions.
sl@0
   277
sl@0
   278
	@return The array of file extensions.
sl@0
   279
	@since  7.0s
sl@0
   280
	*/
sl@0
   281
	IMPORT_C const CDesC8Array& SupportedFileExtensions() const;
sl@0
   282
sl@0
   283
	/**
sl@0
   284
	Returns the array of supported mime types.
sl@0
   285
sl@0
   286
	@return The array of mime types.
sl@0
   287
sl@0
   288
	@since  7.0s
sl@0
   289
	*/
sl@0
   290
	IMPORT_C const CDesC8Array& SupportedMimeTypes() const;
sl@0
   291
sl@0
   292
	/**
sl@0
   293
	Returns the array of supported header data matches.
sl@0
   294
sl@0
   295
	@return The array of header data.
sl@0
   296
	@since 7.0s
sl@0
   297
	*/
sl@0
   298
	IMPORT_C const CDesC8Array& SupportedHeaderData() const;
sl@0
   299
sl@0
   300
	/**
sl@0
   301
	Tests whether this format provides support for the specified file extension, aFileExtension.
sl@0
   302
sl@0
   303
	@param  aFileExtension
sl@0
   304
	        The requested file extension. Must be the extension only, and contain the dot '.'
sl@0
   305
sl@0
   306
	@return A boolean indicating if the specified file extension is supported. ETrue if this format provides 
sl@0
   307
	        the required support, EFalse if it does not.
sl@0
   308
sl@0
   309
	@since  7.0s
sl@0
   310
	*/
sl@0
   311
	IMPORT_C TBool SupportsFileExtension(const TDesC8& aFileExtension) const;
sl@0
   312
sl@0
   313
	/**
sl@0
   314
	Tests whether this format provides support for aMimeType.
sl@0
   315
sl@0
   316
	@param  aMimeType
sl@0
   317
	        The requested mime type.
sl@0
   318
sl@0
   319
	@return A boolean indicating if the format is supported. ETrue if this format provides the required support, EFalse if not.
sl@0
   320
sl@0
   321
	@since 7.0s
sl@0
   322
	*/
sl@0
   323
	IMPORT_C TBool SupportsMimeType(const TDesC8& aMimeType) const;
sl@0
   324
sl@0
   325
	/**
sl@0
   326
	Tests whether this format provides support for aHeaderData.
sl@0
   327
	aHeaderData is searched for each chunk supported by this format.
sl@0
   328
sl@0
   329
	@param	aHeaderData
sl@0
   330
	        The requested header data.
sl@0
   331
	        
sl@0
   332
	@return A boolean indicating if aHeaderData is supported. ETrue if this format provides the required support, EFalse if not.
sl@0
   333
sl@0
   334
	@since  7.0s
sl@0
   335
	*/
sl@0
   336
	IMPORT_C TBool SupportsHeaderDataL(const TDesC8& aHeaderData) const;
sl@0
   337
sl@0
   338
	/**
sl@0
   339
	Tests whether this format provides support for Custom Interfaces.
sl@0
   340
        
sl@0
   341
	@return A boolean indicating if Custom Interfaces are supported. ETrue if this format provides the required support, EFalse if not.
sl@0
   342
	*/
sl@0
   343
	IMPORT_C TBool SupportsCustomInterfaces() const;
sl@0
   344
sl@0
   345
protected:
sl@0
   346
sl@0
   347
	/** 
sl@0
   348
	Constructor 
sl@0
   349
	*/
sl@0
   350
	CMMFFormatImplementationInformation();
sl@0
   351
sl@0
   352
	/** 
sl@0
   353
	2nd phase constructor 
sl@0
   354
	*/
sl@0
   355
	void ConstructL(const CImplementationInformation& aImplInfo);
sl@0
   356
sl@0
   357
	/** 
sl@0
   358
	Adds a file extension to the array of extensions supported by this format. 
sl@0
   359
	*/
sl@0
   360
	void AddFileExtensionL(const TDesC8& aData);
sl@0
   361
sl@0
   362
	/**
sl@0
   363
	Adds a mime type to the array of types supported by this format.
sl@0
   364
	*/
sl@0
   365
	void AddMimeTypeL(const TDesC8& aData);
sl@0
   366
sl@0
   367
	/** 
sl@0
   368
	Adds a chunk of header data to the array of chunks supported by this format.
sl@0
   369
	*/
sl@0
   370
	void AddHeaderDataL(const TDesC8& aData);
sl@0
   371
sl@0
   372
	/** 
sl@0
   373
	from MTaggedDataParserClient 
sl@0
   374
	*/
sl@0
   375
	void ProcessTaggedDataL(const TDesC8& aTag, const TDesC8& aData);
sl@0
   376
sl@0
   377
private:
sl@0
   378
	class CBody;
sl@0
   379
	/** 
sl@0
   380
	CMMFFormatImplementationInformation body
sl@0
   381
	*/
sl@0
   382
	CBody* iBody;
sl@0
   383
	};
sl@0
   384
sl@0
   385
sl@0
   386
/**
sl@0
   387
@publishedAll
sl@0
   388
@released
sl@0
   389
sl@0
   390
Contains controller plugin information retrieved from the ECom registry.
sl@0
   391
sl@0
   392
The object is created using a CImplementationInformation object retrieved from the ECom registry.
sl@0
   393
All relevant data is copied out of the CImplementationInformation object, and its opaque data is
sl@0
   394
parsed to provide the supplier, supported media IDs.
sl@0
   395
sl@0
   396
Notes for Format Plugin developers:
sl@0
   397
The exact formats supported by the controller plugin are calculated by:
sl@0
   398
sl@0
   399
1. The formats supported by the controller plugin itself must be declared in separate entries in the
sl@0
   400
controller plugin resource file.  Two interface UIDs should be defined by the plugin writer - one
sl@0
   401
for the play formats supported, the other for the record formats supported.  The play formats are
sl@0
   402
then listed as implementations of the play format interface uid, and likewise the record formats.
sl@0
   403
sl@0
   404
2. Format plugins (CMMFFormatEncode and CMMFFormatDecode) declare which controller plugin they
sl@0
   405
extend.  ECom is search for the format plugins that extend the controller plugin, and they
sl@0
   406
are added to the list.
sl@0
   407
sl@0
   408
The opaque data section of the ECom plugin resource file must be in the format:
sl@0
   409
@code
sl@0
   410
sl@0
   411
opaque_data = "<?>Data 1<?>Data 2<?>Data 3<?>Data 4[...]<?>Data N";
sl@0
   412
sl@0
   413
The <?> preceding the data determines the meaning of the data.  The following are the possible tags:
sl@0
   414
sl@0
   415
	<s> - Supplier - must be only one
sl@0
   416
	<i> - Media Id
sl@0
   417
	<p> - UID of play format 'interface' - must be only one
sl@0
   418
	<r> - UID of record format 'interface' - must be only one
sl@0
   419
sl@0
   420
UIDs must always be in hex in the format '0x12345678', must include the '0x' and be 10 characters long.
sl@0
   421
@endcode
sl@0
   422
sl@0
   423
@since 7.0s
sl@0
   424
*/
sl@0
   425
class CMMFControllerImplementationInformation : public CMMFPluginImplementationInformation, MTaggedDataParserClient
sl@0
   426
	{
sl@0
   427
public:
sl@0
   428
sl@0
   429
	/**
sl@0
   430
	Constructs a new controller implementation information object.
sl@0
   431
sl@0
   432
	@param  aImplInfo
sl@0
   433
	        The ECOM implementation information.
sl@0
   434
sl@0
   435
	@return The new object created.
sl@0
   436
	
sl@0
   437
	@internalTechnology
sl@0
   438
sl@0
   439
	@since  7.0s
sl@0
   440
	*/
sl@0
   441
	static CMMFControllerImplementationInformation* NewL(const CImplementationInformation& aImplInfo);
sl@0
   442
sl@0
   443
	/**
sl@0
   444
	Constructs a new controller implementation information object.
sl@0
   445
sl@0
   446
	Note: 
sl@0
   447
	The new object will be on the cleanup stack.
sl@0
   448
sl@0
   449
	@param  aImplInfo
sl@0
   450
	        The ECOM implementation information
sl@0
   451
sl@0
   452
	@return The new object created.
sl@0
   453
	
sl@0
   454
	@internalTechnology
sl@0
   455
sl@0
   456
	@since  7.0s
sl@0
   457
	*/
sl@0
   458
	static CMMFControllerImplementationInformation* NewLC(const CImplementationInformation& aImplInfo);
sl@0
   459
sl@0
   460
	/**
sl@0
   461
	Constructs a new controller implementation information object.
sl@0
   462
sl@0
   463
	@param  aUid
sl@0
   464
	        The Uid of the controller to obtain controller implementation information
sl@0
   465
sl@0
   466
	@return The new object created.
sl@0
   467
sl@0
   468
	@since  7.0s
sl@0
   469
	*/
sl@0
   470
	IMPORT_C static CMMFControllerImplementationInformation* NewL(TUid aUid);
sl@0
   471
sl@0
   472
	/**
sl@0
   473
	Destructor.
sl@0
   474
	
sl@0
   475
	@internalTechnology
sl@0
   476
	*/
sl@0
   477
	~CMMFControllerImplementationInformation();
sl@0
   478
sl@0
   479
	/**
sl@0
   480
	Returns the array of play formats supported by this controller.
sl@0
   481
sl@0
   482
	@return The play formats supported.
sl@0
   483
sl@0
   484
	@since  7.0s
sl@0
   485
	*/
sl@0
   486
	IMPORT_C const RMMFFormatImplInfoArray& PlayFormats() const;
sl@0
   487
sl@0
   488
	/**
sl@0
   489
	Returns the array of record formats supported by this controller.
sl@0
   490
sl@0
   491
	@return The record formats supported.
sl@0
   492
sl@0
   493
	@since  7.0s
sl@0
   494
	*/
sl@0
   495
	IMPORT_C const RMMFFormatImplInfoArray& RecordFormats() const;
sl@0
   496
sl@0
   497
	/**
sl@0
   498
	Returns the heap space required by this controller.
sl@0
   499
sl@0
   500
	@return The heap space required.
sl@0
   501
sl@0
   502
	@since  7.0s
sl@0
   503
	*/
sl@0
   504
	IMPORT_C TUint HeapSpaceRequired() const;
sl@0
   505
sl@0
   506
	/**
sl@0
   507
	Queries the ECom registry for the play formats supported. 
sl@0
   508
	
sl@0
   509
	@internalTechnology
sl@0
   510
	*/
sl@0
   511
	void GetPlayFormatsL();
sl@0
   512
sl@0
   513
	/** 
sl@0
   514
	Queries the ECom registry for the record formats supported.
sl@0
   515
	
sl@0
   516
	@internalTechnology
sl@0
   517
	*/
sl@0
   518
	void GetRecordFormatsL();
sl@0
   519
	
sl@0
   520
	/**
sl@0
   521
	Returns the uri schemes of this plugin.
sl@0
   522
sl@0
   523
	@return The array of uri schemes.
sl@0
   524
sl@0
   525
	@internalTechnology
sl@0
   526
	*/
sl@0
   527
	IMPORT_C const CDesC8Array& SupportedUriSchemes() const;
sl@0
   528
	
sl@0
   529
	/**
sl@0
   530
	Tests whether the plugin supports aUriScheme.
sl@0
   531
	
sl@0
   532
	@param  aUriScheme
sl@0
   533
	        The required Uri Scheme.
sl@0
   534
sl@0
   535
	@return A boolean indicating if the plugin supports aUriScheme. ETrue if this plugin supports aUriScheme, EFalse if not.
sl@0
   536
sl@0
   537
	@internalTechnology
sl@0
   538
	*/
sl@0
   539
	IMPORT_C TBool SupportsUriScheme(const TDesC8& aUriScheme) const;
sl@0
   540
	
sl@0
   541
	/**
sl@0
   542
	Tests whether the controller plugin supports url
sl@0
   543
		
sl@0
   544
	@return A boolean indicating if the plugin supports url. ETrue for uri supporting controller, EFalse if not.
sl@0
   545
	
sl@0
   546
	@internalTechnology
sl@0
   547
	*/
sl@0
   548
	IMPORT_C TBool SupportsNetworkCapability() const;
sl@0
   549
	
sl@0
   550
	/**
sl@0
   551
	Sets the uri priority of this controller
sl@0
   552
	
sl@0
   553
	@param  aUriPriority
sl@0
   554
	        The Uri priority to be assigned.
sl@0
   555
	        
sl@0
   556
	@internalTechnology
sl@0
   557
	*/
sl@0
   558
	IMPORT_C void SetUriPriority(TInt aUriPriority);
sl@0
   559
	
sl@0
   560
	/**
sl@0
   561
	Retrieves the uri priority of this controller. 
sl@0
   562
	Higher priority implies greater number. ie UriPriority() returning 3 
sl@0
   563
	has higher prioirty than UriPriority() returning 1.
sl@0
   564
	
sl@0
   565
	@return  The assigned Uri priority.
sl@0
   566
	
sl@0
   567
	@internalTechnology
sl@0
   568
	*/
sl@0
   569
	IMPORT_C TInt UriPriority() const;
sl@0
   570
	
sl@0
   571
	/**
sl@0
   572
	Check whether the controller plugin supports secure DRM process mode
sl@0
   573
		
sl@0
   574
	@return A boolean indicating if the plugin supports secure DRM process mode. 
sl@0
   575
	ETrue for secure DRM process mode supporting controller, EFalse if not.
sl@0
   576
	
sl@0
   577
	@internalTechnology
sl@0
   578
	*/
sl@0
   579
	IMPORT_C TBool SupportsSecureDRMProcessMode() const;
sl@0
   580
sl@0
   581
	/**
sl@0
   582
	Returns the stack space required by this controller.
sl@0
   583
sl@0
   584
	@return The stack space required.
sl@0
   585
	
sl@0
   586
	@internalTechnology
sl@0
   587
	*/
sl@0
   588
	IMPORT_C TUint StackSize() const;
sl@0
   589
	
sl@0
   590
protected:
sl@0
   591
sl@0
   592
	/**
sl@0
   593
	Constructor.
sl@0
   594
	
sl@0
   595
	@internalTechnology
sl@0
   596
	*/
sl@0
   597
	CMMFControllerImplementationInformation();
sl@0
   598
sl@0
   599
	/**
sl@0
   600
	2nd phase constructor.
sl@0
   601
	
sl@0
   602
	@internalTechnology
sl@0
   603
	*/
sl@0
   604
	void ConstructL(const CImplementationInformation& aImplInfo);
sl@0
   605
sl@0
   606
	/**
sl@0
   607
	Parses aData to get the collection UID of the play formats supported by this controller.
sl@0
   608
	
sl@0
   609
	@internalTechnology
sl@0
   610
	*/
sl@0
   611
	void SetPlayFormatCollectionUidL(const TDesC8& aData);
sl@0
   612
sl@0
   613
	/**
sl@0
   614
	Parses aData to get the collection UID of the record formats supported by this controller.
sl@0
   615
	
sl@0
   616
	@internalTechnology
sl@0
   617
	*/
sl@0
   618
	void SetRecordFormatCollectionUidL(const TDesC8& aData);
sl@0
   619
sl@0
   620
	/**
sl@0
   621
	Parses aData to get the size of the stack the controller requires.
sl@0
   622
	
sl@0
   623
	@internalTechnology
sl@0
   624
	*/
sl@0
   625
	void SetHeapSizeL(const TDesC8& aData);
sl@0
   626
sl@0
   627
	/**
sl@0
   628
	From MTaggedDataParserClient.
sl@0
   629
	*/
sl@0
   630
	void ProcessTaggedDataL(const TDesC8& aTag, const TDesC8& aData);
sl@0
   631
sl@0
   632
	/**
sl@0
   633
	Queries the ECom registry for:
sl@0
   634
		- all registry entries with an interface UID of aFormatCollectionUid
sl@0
   635
		- all format plugins with an interface UID of aFormatPluginCollectionUid (ie CMMFFormatEncode
sl@0
   636
		  or CMMFFormatDecode) that have the UID of this controller plugin in the default_data field
sl@0
   637
		  of their ECom resource file.
sl@0
   638
sl@0
   639
	CMMFFormatImplementationInformation objects are created for each entry returned, and appended to
sl@0
   640
	aFormatArray.
sl@0
   641
sl@0
   642
	@param  aFormatCollectionUid
sl@0
   643
	        See above.
sl@0
   644
	@param  aFormatPluginCollectionUid
sl@0
   645
	        See above.
sl@0
   646
	@param  aFormatArray
sl@0
   647
	        See above.
sl@0
   648
	        
sl@0
   649
	@internalTechnology
sl@0
   650
sl@0
   651
	@since  7.0s
sl@0
   652
	*/
sl@0
   653
	void GetFormatsL(TUid aFormatCollectionUid, TUid aFormatPluginCollectionUid, RMMFFormatImplInfoArray& aFormatArray);
sl@0
   654
sl@0
   655
	/**
sl@0
   656
	Creates CMMFFormatImplementationInformation objects for all CImplementationInformation objects
sl@0
   657
	in aEcomArray.  Any corrupt objects are ignored.  The objects created are added to aFormatArray.
sl@0
   658
sl@0
   659
	@param  aEcomArray
sl@0
   660
	        See above.
sl@0
   661
	@param  aFormatArray
sl@0
   662
	        See above.
sl@0
   663
	        
sl@0
   664
	@internalTechnology
sl@0
   665
sl@0
   666
	@since  7.0s
sl@0
   667
	*/
sl@0
   668
	void AddFormatsSwallowCorruptL(RImplInfoPtrArray& aEcomArray, RMMFFormatImplInfoArray& aFormatArray);
sl@0
   669
	
sl@0
   670
	/**
sl@0
   671
	Sets the Uri Scheme found in opaque data
sl@0
   672
	
sl@0
   673
	@param  aUriScheme
sl@0
   674
			Gives the uri scheme supported by the controller
sl@0
   675
	
sl@0
   676
	@internalTechnology
sl@0
   677
	*/
sl@0
   678
	void SetUriSchemeL(const TDesC8& aUriScheme);
sl@0
   679
	
sl@0
   680
	/**
sl@0
   681
	Sets the Network capability found in opaque data
sl@0
   682
	
sl@0
   683
	@param  aNetworkCapable
sl@0
   684
			Declares the incapability to support uri if matches to 'yes'. 
sl@0
   685
			If this is the case, iIsNetworkCtrl is set to EFalse
sl@0
   686
	
sl@0
   687
	@internalTechnology
sl@0
   688
	*/
sl@0
   689
	void SetNetworkCapabilityL(const TDesC8& aNetworkCapable);
sl@0
   690
sl@0
   691
	/**
sl@0
   692
	Parses aData to get the size of the stack the controller requires.
sl@0
   693
		
sl@0
   694
	@internalTechnology
sl@0
   695
	*/
sl@0
   696
	void SetStackSizeL(const TDesC8& aData);
sl@0
   697
sl@0
   698
sl@0
   699
private:
sl@0
   700
sl@0
   701
	/**
sl@0
   702
	The play formats supported by this controller.
sl@0
   703
	*/
sl@0
   704
	RMMFFormatImplInfoArray iPlayFormats;
sl@0
   705
sl@0
   706
	/**
sl@0
   707
	The record formats supported by this controller.
sl@0
   708
	*/
sl@0
   709
	RMMFFormatImplInfoArray iRecordFormats;
sl@0
   710
sl@0
   711
	/**
sl@0
   712
	The interface uid of the resource file definitions of the play formats supported directly by this controller.
sl@0
   713
	*/
sl@0
   714
	TUid iPlayFormatCollectionUid;
sl@0
   715
sl@0
   716
	/**
sl@0
   717
	The interface uid of the resource file definitions of the record formats supported directly by this controller.
sl@0
   718
	*/
sl@0
   719
	TUid iRecordFormatCollectionUid;
sl@0
   720
	
sl@0
   721
	/**
sl@0
   722
	The heap space required by this controller
sl@0
   723
	*/
sl@0
   724
	TUint iHeapSpaceRequired;
sl@0
   725
		
sl@0
   726
	/**
sl@0
   727
	The Uri scheme supported by this plugin
sl@0
   728
	*/
sl@0
   729
	CDesC8Array* iUriSchemes;
sl@0
   730
	
sl@0
   731
	/**
sl@0
   732
	The uri priority acquired by this controller
sl@0
   733
	*/
sl@0
   734
	TInt iUriPriority;  
sl@0
   735
	
sl@0
   736
	/**
sl@0
   737
	The uri support provided by this controller
sl@0
   738
	*/
sl@0
   739
	TBool iIsNetworkCtrl;
sl@0
   740
	
sl@0
   741
	/**
sl@0
   742
	Secure DRM process model supported by this controller
sl@0
   743
	*/
sl@0
   744
	TBool  iSupportsSecureDRMProcessMode;
sl@0
   745
	/**
sl@0
   746
	The stack space required by this controller
sl@0
   747
	*/
sl@0
   748
	TUint iStackSize;		
sl@0
   749
	};
sl@0
   750
sl@0
   751
sl@0
   752
/**
sl@0
   753
@publishedAll
sl@0
   754
sl@0
   755
Contains the parameters used to select mmf plugins from the ECOM registry.
sl@0
   756
sl@0
   757
@released
sl@0
   758
@since 7.0s
sl@0
   759
*/
sl@0
   760
class CMMFPluginSelectionParameters : public CBase
sl@0
   761
	{
sl@0
   762
public:
sl@0
   763
sl@0
   764
/**
sl@0
   765
Describes the type of preferred supplier match to be performed on the plugins return from
sl@0
   766
the ECOM registry.
sl@0
   767
*/
sl@0
   768
enum TPreferredSupplierMatchType
sl@0
   769
	{
sl@0
   770
sl@0
   771
	/**	No preferred supplier match will be performed.
sl@0
   772
	*/
sl@0
   773
	ENoPreferredSupplierMatch,
sl@0
   774
sl@0
   775
	/** Plugins from all suppliers will be returned, but those from the preferred supplier will be first in the list.
sl@0
   776
	*/
sl@0
   777
	EPreferredSupplierPluginsFirstInList,
sl@0
   778
sl@0
   779
	/** Only plugins from the preferred supplier will be returned.
sl@0
   780
	*/
sl@0
   781
	EOnlyPreferredSupplierPluginsReturned
sl@0
   782
	};
sl@0
   783
/**
sl@0
   784
Describes the type of media ID match to be performed on the plugins return from
sl@0
   785
the ECOM registry.
sl@0
   786
*/
sl@0
   787
enum TMediaIdMatchType
sl@0
   788
	{
sl@0
   789
sl@0
   790
	/** No media ID match will be performed.
sl@0
   791
	*/
sl@0
   792
	ENoMediaIdMatch,
sl@0
   793
sl@0
   794
	/** All plugins that support the media ID supplied will be returned, even those that support
sl@0
   795
	other media IDs.  For example, if an audio plugin is requested, plugins that support
sl@0
   796
	audio and video will also be returned.
sl@0
   797
	*/
sl@0
   798
	EAllowOtherMediaIds,
sl@0
   799
sl@0
   800
	/** Only plugins that support the exact media IDs supplied will be returned.  For example, if an
sl@0
   801
	audio plugin is requested, plugins that only support audio will be returned
sl@0
   802
	(ie. no audio/video plugins).
sl@0
   803
	*/
sl@0
   804
	EAllowOnlySuppliedMediaIds
sl@0
   805
	};
sl@0
   806
sl@0
   807
public:
sl@0
   808
sl@0
   809
	/**
sl@0
   810
	Destructor.  Resets and destroys all member data.
sl@0
   811
sl@0
   812
	@since 7.0s
sl@0
   813
	*/
sl@0
   814
	virtual ~CMMFPluginSelectionParameters();
sl@0
   815
sl@0
   816
sl@0
   817
	/**
sl@0
   818
	Sets the preferred supplier of the plugin.
sl@0
   819
sl@0
   820
	@param  aPreferredSupplier
sl@0
   821
	        The preferred supplier of the plugin.
sl@0
   822
	@param  aMatchType
sl@0
   823
	        The type of match to be made.
sl@0
   824
sl@0
   825
	@since  7.0s
sl@0
   826
	*/
sl@0
   827
	IMPORT_C void SetPreferredSupplierL(const TDesC& aPreferredSupplier, TPreferredSupplierMatchType aMatchType);
sl@0
   828
sl@0
   829
	/**
sl@0
   830
	Sets the media IDs that must be supported by the plugin, for example audio, video etc.
sl@0
   831
sl@0
   832
	@param  aMediaIds
sl@0
   833
	        An array of the media IDs that the selected plugins must support.
sl@0
   834
	@param  aMatchType
sl@0
   835
	        The type of match to be made.
sl@0
   836
sl@0
   837
	@since  7.0s
sl@0
   838
	*/
sl@0
   839
	IMPORT_C void SetMediaIdsL(const RArray<TUid>& aMediaIds, TMediaIdMatchType aMatchType);
sl@0
   840
sl@0
   841
	/**
sl@0
   842
	Returns the preferred supplier.  If no preferred supplier has been set, a blank 
sl@0
   843
	string will be returned.
sl@0
   844
	
sl@0
   845
	@return The preferred supplier
sl@0
   846
	@since 7.0s
sl@0
   847
	*/
sl@0
   848
	IMPORT_C const TDesC& PreferredSupplier() const;
sl@0
   849
sl@0
   850
	/**
sl@0
   851
	Returns the type of preferred supplier match to perform.
sl@0
   852
sl@0
   853
	@return The preferred supplier match type.
sl@0
   854
	@since 7.0s
sl@0
   855
	*/
sl@0
   856
	IMPORT_C TPreferredSupplierMatchType PreferredSupplierMatchType() const;
sl@0
   857
sl@0
   858
	/**
sl@0
   859
	Returns the list of media IDs that must be supported by the plugin.
sl@0
   860
sl@0
   861
	@return The list of media IDs.
sl@0
   862
sl@0
   863
	@since	7.0s
sl@0
   864
	*/
sl@0
   865
	IMPORT_C const RArray<TUid>& MediaIds() const;
sl@0
   866
sl@0
   867
	/**
sl@0
   868
	Returns the type of preferred supplier match to perform.
sl@0
   869
	
sl@0
   870
	@return The preferred supplier match type.
sl@0
   871
sl@0
   872
	@since 7.0s
sl@0
   873
	*/
sl@0
   874
	IMPORT_C TMediaIdMatchType MediaIdMatchType() const;
sl@0
   875
sl@0
   876
	/**
sl@0
   877
	Returns the uid of the interface to be searched for plugin matches.
sl@0
   878
sl@0
   879
	@return The interface uid.
sl@0
   880
sl@0
   881
	@since 7.0s
sl@0
   882
	*/
sl@0
   883
	IMPORT_C TUid InterfaceUid() const;
sl@0
   884
sl@0
   885
protected:
sl@0
   886
sl@0
   887
	/**
sl@0
   888
	Protected constructor.
sl@0
   889
sl@0
   890
	Defaults to setting the TPreferredSupplierMatchType enum to ENoPreferredSupplierMatch and TMediaIdMatchType
sl@0
   891
	to ENoMediaIdMatch.
sl@0
   892
sl@0
   893
	@param  aPluginInterfaceUid
sl@0
   894
	        The plugin's interface UID.
sl@0
   895
	*/
sl@0
   896
	CMMFPluginSelectionParameters(TUid aPluginInterfaceUid);
sl@0
   897
sl@0
   898
	/**
sl@0
   899
	Tests whether the specified media is supported by the plugin.
sl@0
   900
sl@0
   901
	@param  aPlugin
sl@0
   902
	        The media to test.
sl@0
   903
sl@0
   904
	@return A boolean indicating if the specified media is supported by the plugin. ETrue if the specified 
sl@0
   905
	        media is supported by the plugin. EFalse if the specified media is not supported by the plugin.
sl@0
   906
	*/
sl@0
   907
	TBool CheckMediaIdSupportL(const CMMFPluginImplementationInformation& aPlugin) const;
sl@0
   908
private:
sl@0
   909
	TUid iPluginInterfaceUid;
sl@0
   910
	HBufC* iPreferredSupplier;
sl@0
   911
	TPreferredSupplierMatchType iPreferredSupplierMatchType;
sl@0
   912
	RArray<TUid> iMediaIds;
sl@0
   913
	TMediaIdMatchType iMediaIdMatchType;
sl@0
   914
	};
sl@0
   915
sl@0
   916
/**
sl@0
   917
@publishedAll
sl@0
   918
sl@0
   919
Defines the format support required.
sl@0
   920
sl@0
   921
On construction, the selection parameters are blank, causing all plugins to be returned.
sl@0
   922
sl@0
   923
@released
sl@0
   924
@since 7.0s
sl@0
   925
*/
sl@0
   926
class CMMFFormatSelectionParameters : public CBase
sl@0
   927
	{
sl@0
   928
public:
sl@0
   929
/**
sl@0
   930
Describes the type of match to be performed.
sl@0
   931
The match types are mutually exclusive.
sl@0
   932
*/
sl@0
   933
enum TMatchDataType
sl@0
   934
	{
sl@0
   935
sl@0
   936
	/** All plugins will be selected. This is the default option.
sl@0
   937
	*/
sl@0
   938
	EMatchAny,
sl@0
   939
sl@0
   940
	/** The match will be based on a file extension.
sl@0
   941
	*/
sl@0
   942
	EMatchFileExtension,
sl@0
   943
sl@0
   944
	/** The match will be based on a mime type.
sl@0
   945
	*/
sl@0
   946
	EMatchMimeType,
sl@0
   947
sl@0
   948
	/** The match will be based on a header data.
sl@0
   949
	*/
sl@0
   950
	EMatchHeaderData,
sl@0
   951
	
sl@0
   952
	/** 
sl@0
   953
	@publishedPartner
sl@0
   954
	@released
sl@0
   955
	
sl@0
   956
	The match will be based on Uri details.
sl@0
   957
	*/
sl@0
   958
	EMatchUri
sl@0
   959
	};
sl@0
   960
sl@0
   961
public:
sl@0
   962
	
sl@0
   963
	/**
sl@0
   964
	Allocates and constructs a new format selection parameter object with blank parameters.
sl@0
   965
sl@0
   966
	Calls NewLC().
sl@0
   967
sl@0
   968
	@return A new format selection parameter object.
sl@0
   969
	*/
sl@0
   970
	IMPORT_C static CMMFFormatSelectionParameters* NewL();
sl@0
   971
sl@0
   972
	/**
sl@0
   973
    Allocates and constructs a new format selection parameter object with blank parameters, placing it on the 
sl@0
   974
	cleanup stack.
sl@0
   975
sl@0
   976
	@return A new format selection parameter object.
sl@0
   977
	*/
sl@0
   978
	IMPORT_C static CMMFFormatSelectionParameters* NewLC();
sl@0
   979
sl@0
   980
	/**
sl@0
   981
	Allocates and constructs a new format selection parameter object with the specified parameters.
sl@0
   982
sl@0
   983
	@param  aParams
sl@0
   984
	        The required parameters.
sl@0
   985
	@return A new format selection parameter object.
sl@0
   986
	*/
sl@0
   987
	static CMMFFormatSelectionParameters* NewL(const CMMFFormatSelectionParameters& aParams);
sl@0
   988
sl@0
   989
	/**
sl@0
   990
	Sets this object to match to a file extension.
sl@0
   991
sl@0
   992
	aFileName can be a full filename or just an extension.  If there is no dot in the filename
sl@0
   993
	and it is 5 characters or less in length then it is assumed to be an extension.  If the first
sl@0
   994
	character of the filename is a dot, it assumed to be an extension.  Otherwise, the filename
sl@0
   995
	is parsed using TParse to reveal the extension.
sl@0
   996
sl@0
   997
	Once the extension has been extracted, it is converted from unicode to utf8 and copied into
sl@0
   998
	iMatchData.
sl@0
   999
sl@0
  1000
	@param  aFileName
sl@0
  1001
	        The file name to be matched.  Must include the extension.
sl@0
  1002
sl@0
  1003
	@since  7.0s
sl@0
  1004
	*/
sl@0
  1005
	IMPORT_C void SetMatchToFileNameL(const TDesC& aFileName);
sl@0
  1006
sl@0
  1007
	/**
sl@0
  1008
	Sets this object to match to a file extension specified by a URI
sl@0
  1009
sl@0
  1010
	Once the extension has been extracted, it is copied into iMatchData.
sl@0
  1011
sl@0
  1012
   	@param  aUri
sl@0
  1013
	        The URI containing the file name to be matched.  Must include the extension.
sl@0
  1014
sl@0
  1015
	@since  7.0s
sl@0
  1016
	*/
sl@0
  1017
	IMPORT_C void SetMatchToUriL(const TDesC& aUri);
sl@0
  1018
	
sl@0
  1019
	/**
sl@0
  1020
	@publishedPartner
sl@0
  1021
	@released
sl@0
  1022
	
sl@0
  1023
	Sets this object to match to uri scheme and file extension specified by a URI.
sl@0
  1024
	
sl@0
  1025
	The Uri scheme and extension are saved in iMatchReqData. Further,iMatchData contains uri extension, 
sl@0
  1026
	iMatchUriScheme contains uri scheme.
sl@0
  1027
sl@0
  1028
	@param  aUri
sl@0
  1029
	        The URI containing the scheme and uri extension to be matched. 
sl@0
  1030
sl@0
  1031
	*/
sl@0
  1032
	IMPORT_C void SetMatchToUriSupportL(const TDesC& aUri);
sl@0
  1033
	
sl@0
  1034
	/**
sl@0
  1035
	Sets this object to match to a MIME type.
sl@0
  1036
	
sl@0
  1037
	@param  aMimeType
sl@0
  1038
	        The mime type to match.
sl@0
  1039
sl@0
  1040
	@since  7.0s
sl@0
  1041
	*/
sl@0
  1042
	IMPORT_C void SetMatchToMimeTypeL(const TDesC8& aMimeType);
sl@0
  1043
sl@0
  1044
	/**
sl@0
  1045
	Sets this object to match to a pattern in header data.
sl@0
  1046
	
sl@0
  1047
	@param  aHeaderData
sl@0
  1048
	        The header of the file in question.  This header data will be matched
sl@0
  1049
	        against the match patterns provided by the plugins.
sl@0
  1050
sl@0
  1051
	@since  7.0s
sl@0
  1052
	*/
sl@0
  1053
	IMPORT_C void SetMatchToHeaderDataL(const TDesC8& aHeaderData);
sl@0
  1054
sl@0
  1055
	/**
sl@0
  1056
	Returns the data used to perform the plugin match.
sl@0
  1057
	
sl@0
  1058
	@return The match data.
sl@0
  1059
sl@0
  1060
	@since  7.0s
sl@0
  1061
	*/
sl@0
  1062
	IMPORT_C const TDesC8& MatchData() const;
sl@0
  1063
	
sl@0
  1064
	/**
sl@0
  1065
	@publishedPartner
sl@0
  1066
	@released
sl@0
  1067
	
sl@0
  1068
	Returns the uri scheme used to perform the plugin match.
sl@0
  1069
	
sl@0
  1070
	@return The uri scheme.
sl@0
  1071
sl@0
  1072
	*/
sl@0
  1073
	IMPORT_C const TDesC8& MatchUriScheme() const;
sl@0
  1074
sl@0
  1075
	/**
sl@0
  1076
	Returns the type of the data used to perform the plugin match.
sl@0
  1077
sl@0
  1078
	@return The match data type.
sl@0
  1079
sl@0
  1080
	@since  7.0s
sl@0
  1081
	*/
sl@0
  1082
	IMPORT_C TMatchDataType MatchDataType() const;
sl@0
  1083
	
sl@0
  1084
	/**
sl@0
  1085
	Destructor.
sl@0
  1086
	*/
sl@0
  1087
	virtual ~CMMFFormatSelectionParameters();
sl@0
  1088
protected:
sl@0
  1089
sl@0
  1090
	/**
sl@0
  1091
	Protected constructor.
sl@0
  1092
	*/
sl@0
  1093
	CMMFFormatSelectionParameters();
sl@0
  1094
	void ConstructL(const CMMFFormatSelectionParameters& aParams);
sl@0
  1095
sl@0
  1096
private:
sl@0
  1097
	CMatchData* iMatchReqData;
sl@0
  1098
	TMatchDataType iMatchDataType;
sl@0
  1099
	};
sl@0
  1100
sl@0
  1101
sl@0
  1102
sl@0
  1103
/**
sl@0
  1104
@publishedAll
sl@0
  1105
@released
sl@0
  1106
sl@0
  1107
Contains the parameters used to select controller plugins from the ECOM registry.
sl@0
  1108
sl@0
  1109
@since  7.0s
sl@0
  1110
*/
sl@0
  1111
class CMMFControllerPluginSelectionParameters : public CMMFPluginSelectionParameters
sl@0
  1112
	{
sl@0
  1113
public:
sl@0
  1114
sl@0
  1115
	/**
sl@0
  1116
	Constructs a new controller selection parameters object.
sl@0
  1117
sl@0
  1118
	@return The new object created.
sl@0
  1119
sl@0
  1120
	@since  7.0s
sl@0
  1121
	*/
sl@0
  1122
	IMPORT_C static CMMFControllerPluginSelectionParameters* NewL();
sl@0
  1123
sl@0
  1124
	/**
sl@0
  1125
	Construct a new controller selection parameters object.
sl@0
  1126
	
sl@0
  1127
	@return The new object created.  Note that the new object will be left on the cleanup stack.
sl@0
  1128
sl@0
  1129
	@since  7.0s
sl@0
  1130
	*/
sl@0
  1131
	IMPORT_C static CMMFControllerPluginSelectionParameters* NewLC();
sl@0
  1132
sl@0
  1133
	/**
sl@0
  1134
	Sets the play format support required.
sl@0
  1135
sl@0
  1136
	Note:
sl@0
  1137
	The play formats supported by the controller plugins will only be retrieved if
sl@0
  1138
	this method is called.  To get all the play formats supported by the system, call this
sl@0
  1139
	with a 'blank' CMMFFormatSelectionParameters object.
sl@0
  1140
sl@0
  1141
	@param  aRequiredSupport
sl@0
  1142
	        The play format support required.
sl@0
  1143
sl@0
  1144
	@since  7.0s
sl@0
  1145
	*/
sl@0
  1146
	IMPORT_C void SetRequiredPlayFormatSupportL(const CMMFFormatSelectionParameters& aRequiredSupport);
sl@0
  1147
sl@0
  1148
	/**
sl@0
  1149
	Sets the record format support required.
sl@0
  1150
sl@0
  1151
	Note:
sl@0
  1152
	The record formats supported by the controller plugins will only be retrieved if
sl@0
  1153
	this method is called.  To get all the record formats supported by the system, call this
sl@0
  1154
	with a 'blank' CMMFFormatSelectionParameters object.
sl@0
  1155
sl@0
  1156
	@param  aRequiredSupport
sl@0
  1157
	        The record format support required.
sl@0
  1158
sl@0
  1159
	@return The new object created.
sl@0
  1160
sl@0
  1161
	@since  7.0s
sl@0
  1162
	*/
sl@0
  1163
	IMPORT_C void SetRequiredRecordFormatSupportL(const CMMFFormatSelectionParameters& aRequiredSupport);
sl@0
  1164
sl@0
  1165
	/**
sl@0
  1166
	Retrieves all controller plugins that support the requirements of the caller.
sl@0
  1167
sl@0
  1168
	@param  aImplementations	
sl@0
  1169
	        After this method returns, this array will contain all the
sl@0
  1170
	        controller plugins that support the caller's requirements.
sl@0
  1171
	        Note: The array will be emptied by this method.
sl@0
  1172
sl@0
  1173
	@since  7.0s
sl@0
  1174
	*/
sl@0
  1175
	IMPORT_C virtual void ListImplementationsL(RMMFControllerImplInfoArray& aImplementations) const;
sl@0
  1176
	
sl@0
  1177
	/** 
sl@0
  1178
	Destructor
sl@0
  1179
	*/
sl@0
  1180
	virtual ~CMMFControllerPluginSelectionParameters();
sl@0
  1181
protected:
sl@0
  1182
	CMMFControllerPluginSelectionParameters();
sl@0
  1183
	void MatchImplementationToSelectParamsL(RMMFControllerImplInfoArray& aImplementations, const CMMFControllerImplementationInformation& aPlugin, TInt& aArrayPos) const;
sl@0
  1184
	TInt CheckPreferredSupplierL(RMMFControllerImplInfoArray& aImplementations, const CMMFControllerImplementationInformation& aPlugin) const;
sl@0
  1185
	TBool CheckFormatSupportL(CMMFFormatSelectionParameters* aSelectParams, const RMMFFormatImplInfoArray& aFormats) const;
sl@0
  1186
	/**
sl@0
  1187
	Checks the given Controller for uri support. Uri support may be there 
sl@0
  1188
	if either requiredscheme or extension matches with that given controller
sl@0
  1189
	
sl@0
  1190
	@param  aSelectParams 
sl@0
  1191
			Describes the selection parameter which a controller needs to 
sl@0
  1192
			support in order to be selected
sl@0
  1193
			
sl@0
  1194
	@param	aPlugin
sl@0
  1195
			The controller plugin which is checked for uri support 
sl@0
  1196
			
sl@0
  1197
	@param	aFormats
sl@0
  1198
			The play or record formats looked for extension match
sl@0
  1199
	*/
sl@0
  1200
	TBool CheckUriSupport(CMMFFormatSelectionParameters* aSelectParams, CMMFControllerImplementationInformation* aPlugin, const RMMFFormatImplInfoArray& aFormats) const;
sl@0
  1201
sl@0
  1202
protected:
sl@0
  1203
	/**
sl@0
  1204
	The required play format support
sl@0
  1205
	*/
sl@0
  1206
	CMMFFormatSelectionParameters* iRequiredPlayFormatSupport;
sl@0
  1207
	
sl@0
  1208
	/**
sl@0
  1209
	The required record format support
sl@0
  1210
	*/
sl@0
  1211
	CMMFFormatSelectionParameters* iRequiredRecordFormatSupport;
sl@0
  1212
	};
sl@0
  1213
sl@0
  1214
/**
sl@0
  1215
@publishedAll
sl@0
  1216
@released
sl@0
  1217
sl@0
  1218
Contains the parameters used to select controller plugins which support SecureDRM model 
sl@0
  1219
from the ECOM registry. Controller plugins which support SecureDRM model allow play back of DRM-protected
sl@0
  1220
content by client processes without DRM capability. In such case the controller will be loaded in a separate secure DRM process.
sl@0
  1221
*/
sl@0
  1222
class CMMFControllerSecureDrmPluginSelectionParameters : public CMMFControllerPluginSelectionParameters
sl@0
  1223
	{
sl@0
  1224
sl@0
  1225
public:
sl@0
  1226
	/**
sl@0
  1227
	Constructs a new controller selection parameters object.
sl@0
  1228
sl@0
  1229
	@return The new object created.
sl@0
  1230
	*/
sl@0
  1231
	IMPORT_C static CMMFControllerSecureDrmPluginSelectionParameters* NewL();
sl@0
  1232
sl@0
  1233
	/**
sl@0
  1234
	Construct a new controller selection parameters object.
sl@0
  1235
	
sl@0
  1236
	@return The new object created.  Note that the new object will be left on the cleanup stack.
sl@0
  1237
	*/
sl@0
  1238
	IMPORT_C static CMMFControllerSecureDrmPluginSelectionParameters* NewLC();
sl@0
  1239
	
sl@0
  1240
	/**
sl@0
  1241
	Retrieves all controller plugins that support SecureDRM model and the requirements of the caller.
sl@0
  1242
sl@0
  1243
	@param  aImplementations	
sl@0
  1244
	        After this method returns, this array will contain all the
sl@0
  1245
	        controller plugins that support the caller's requirements.
sl@0
  1246
	        Note: The array will be emptied by this method and SecureDRM model.
sl@0
  1247
	*/
sl@0
  1248
	IMPORT_C virtual void ListImplementationsL(RMMFControllerImplInfoArray& aImplementations) const;
sl@0
  1249
sl@0
  1250
	/** 
sl@0
  1251
	Destructor
sl@0
  1252
	*/
sl@0
  1253
	virtual ~CMMFControllerSecureDrmPluginSelectionParameters() {};
sl@0
  1254
protected:
sl@0
  1255
	CMMFControllerSecureDrmPluginSelectionParameters();
sl@0
  1256
	};
sl@0
  1257
sl@0
  1258
/**
sl@0
  1259
@publishedAll
sl@0
  1260
@released
sl@0
  1261
sl@0
  1262
Abstract class used to contain the parameters used to select format plugins from the ECOM registry.
sl@0
  1263
sl@0
  1264
Note: 
sl@0
  1265
The classes CMMFFormatEncodePluginSelectionParamters and CMMFFormatDecodePluginSelectionParameters
sl@0
  1266
should be used to list and select format plugin implementations.
sl@0
  1267
sl@0
  1268
@since  7.0s
sl@0
  1269
*/
sl@0
  1270
class CMMFFormatPluginSelectionParameters : public CMMFPluginSelectionParameters
sl@0
  1271
	{
sl@0
  1272
public:
sl@0
  1273
sl@0
  1274
	/**
sl@0
  1275
	Retrieves all format plugins that support the requirements of the caller.
sl@0
  1276
sl@0
  1277
	@param  aImplementations
sl@0
  1278
	        After this function returns, this array will contain all the
sl@0
  1279
	        format plugins that support the caller's requirements.
sl@0
  1280
	        Note: The array will be emptied by this method.
sl@0
  1281
sl@0
  1282
	@since  7.0s
sl@0
  1283
	*/
sl@0
  1284
	IMPORT_C void ListImplementationsL(RMMFFormatImplInfoArray& aImplementations) const;
sl@0
  1285
sl@0
  1286
	/**
sl@0
  1287
	Sets the format support required.
sl@0
  1288
sl@0
  1289
	@param  aRequiredSupport
sl@0
  1290
	        The format support required.
sl@0
  1291
sl@0
  1292
	@since  7.0s
sl@0
  1293
	*/
sl@0
  1294
	IMPORT_C void SetRequiredFormatSupportL(const CMMFFormatSelectionParameters& aRequiredSupport);
sl@0
  1295
sl@0
  1296
	/**
sl@0
  1297
	Destructor.
sl@0
  1298
	*/
sl@0
  1299
	virtual ~CMMFFormatPluginSelectionParameters();
sl@0
  1300
protected:
sl@0
  1301
	/**
sl@0
  1302
	Protected constructor.
sl@0
  1303
	*/
sl@0
  1304
	CMMFFormatPluginSelectionParameters(TUid aInterfaceUid);
sl@0
  1305
sl@0
  1306
	void MatchImplementationToSelectParamsL(RMMFFormatImplInfoArray& aImplementations, const CMMFFormatImplementationInformation& aPlugin, TInt& aArrayPos) const;
sl@0
  1307
	TInt CheckPreferredSupplierL(RMMFFormatImplInfoArray& aImplementations, const CMMFFormatImplementationInformation& aPlugin) const;
sl@0
  1308
	TBool CheckFormatSupportL(const CMMFFormatImplementationInformation& aPlugin) const;
sl@0
  1309
protected:
sl@0
  1310
	/**
sl@0
  1311
	The format support required
sl@0
  1312
	*/
sl@0
  1313
	CMMFFormatSelectionParameters* iRequiredFormatSupport;
sl@0
  1314
	};
sl@0
  1315
sl@0
  1316
/**
sl@0
  1317
@publishedAll
sl@0
  1318
@released
sl@0
  1319
sl@0
  1320
Class used to list and select plugins implementing the CMMFFormatEncode interface.
sl@0
  1321
sl@0
  1322
@since 7.0s
sl@0
  1323
*/
sl@0
  1324
class CMMFFormatEncodePluginSelectionParameters : public CMMFFormatPluginSelectionParameters
sl@0
  1325
	{
sl@0
  1326
public:
sl@0
  1327
sl@0
  1328
	/**
sl@0
  1329
	Construct a new format encode selection parameters object.
sl@0
  1330
	
sl@0
  1331
	@return The new object created.
sl@0
  1332
sl@0
  1333
	@since  7.0s
sl@0
  1334
	*/
sl@0
  1335
	IMPORT_C static CMMFFormatEncodePluginSelectionParameters* NewL();
sl@0
  1336
sl@0
  1337
	/**
sl@0
  1338
	Constructs a new format encode selection parameters object.
sl@0
  1339
sl@0
  1340
	@return The new object created.  Note that the new object will be left on the cleanup stack.
sl@0
  1341
sl@0
  1342
	@since  7.0s
sl@0
  1343
	*/
sl@0
  1344
	IMPORT_C static CMMFFormatEncodePluginSelectionParameters* NewLC();
sl@0
  1345
protected:
sl@0
  1346
	/**
sl@0
  1347
	Protected constructor.
sl@0
  1348
	*/
sl@0
  1349
	CMMFFormatEncodePluginSelectionParameters();
sl@0
  1350
	};
sl@0
  1351
sl@0
  1352
sl@0
  1353
/**
sl@0
  1354
@publishedAll
sl@0
  1355
@released
sl@0
  1356
sl@0
  1357
Class used to list and select plugins implementing the CMMFFormatDecode interface.
sl@0
  1358
sl@0
  1359
@since 7.0s
sl@0
  1360
*/
sl@0
  1361
class CMMFFormatDecodePluginSelectionParameters : public CMMFFormatPluginSelectionParameters
sl@0
  1362
	{
sl@0
  1363
public:
sl@0
  1364
sl@0
  1365
	/**
sl@0
  1366
	Constructs a new format decode selection parameters object.
sl@0
  1367
sl@0
  1368
	@return The new object created.
sl@0
  1369
	
sl@0
  1370
	@since  7.0s
sl@0
  1371
	*/
sl@0
  1372
	IMPORT_C static CMMFFormatDecodePluginSelectionParameters* NewL();
sl@0
  1373
sl@0
  1374
	/**
sl@0
  1375
	Constructs a new format decode selection parameters object.
sl@0
  1376
sl@0
  1377
	@return The new object created. Note that the new object will be left on the cleanup stack.
sl@0
  1378
sl@0
  1379
	@since  7.0s
sl@0
  1380
	*/
sl@0
  1381
	IMPORT_C static CMMFFormatDecodePluginSelectionParameters* NewLC();
sl@0
  1382
protected:
sl@0
  1383
	/**
sl@0
  1384
	Protected constructor.
sl@0
  1385
	*/
sl@0
  1386
	CMMFFormatDecodePluginSelectionParameters();
sl@0
  1387
	};
sl@0
  1388
sl@0
  1389
sl@0
  1390
sl@0
  1391
/** 
sl@0
  1392
@publishedAll
sl@0
  1393
@released
sl@0
  1394
sl@0
  1395
Template class CleanupResetAndDestroy to clean up the array
sl@0
  1396
of implementation information from the cleanup stack.
sl@0
  1397
*/
sl@0
  1398
sl@0
  1399
template <class T>
sl@0
  1400
class CleanupResetAndDestroy
sl@0
  1401
	{
sl@0
  1402
public:
sl@0
  1403
	/**
sl@0
  1404
	Puts an item on the cleanup stack.
sl@0
  1405
sl@0
  1406
	@param  aRef 
sl@0
  1407
	        The implementation information to be put on the cleanup stack.
sl@0
  1408
	*/
sl@0
  1409
	inline static void PushL(T& aRef);
sl@0
  1410
private:
sl@0
  1411
	static void ResetAndDestroy(TAny *aPtr);
sl@0
  1412
	};
sl@0
  1413
template <class T>
sl@0
  1414
inline void CleanupResetAndDestroyPushL(T& aRef);
sl@0
  1415
template <class T>
sl@0
  1416
inline void CleanupResetAndDestroy<T>::PushL(T& aRef)
sl@0
  1417
	{CleanupStack::PushL(TCleanupItem(&ResetAndDestroy,&aRef));}
sl@0
  1418
template <class T>
sl@0
  1419
void CleanupResetAndDestroy<T>::ResetAndDestroy(TAny *aPtr)
sl@0
  1420
	{(STATIC_CAST(T*,aPtr))->ResetAndDestroy();}
sl@0
  1421
template <class T>
sl@0
  1422
inline void CleanupResetAndDestroyPushL(T& aRef)
sl@0
  1423
	{CleanupResetAndDestroy<T>::PushL(aRef);}
sl@0
  1424
sl@0
  1425
sl@0
  1426
#endif