00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef DRMAUDIOSAMPLEPLAYER_H
00023 #define DRMAUDIOSAMPLEPLAYER_H
00024
00025
00026
00027 #include <e32base.h>
00028 #include <MdaAudioSamplePlayer.h>
00029
00030
00031 class CMMFDrmAudioPlayerUtility;
00032
00033
00034
00043 class MDrmAudioPlayerCallback
00044 {
00045 public:
00063 virtual void MdapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration) = 0;
00064
00081 virtual void MdapcPlayComplete(TInt aError) = 0;
00082 };
00083
00084
00085
00096 class CDrmPlayerUtility : public CBase
00097 {
00098 public:
00099
00103 IMPORT_C static CDrmPlayerUtility* NewL(MDrmAudioPlayerCallback& aCallback,TInt aPriority,
00104 TMdaPriorityPreference aPref);
00105
00109 IMPORT_C static CDrmPlayerUtility* NewFilePlayerL(const TDesC& aFileName,MDrmAudioPlayerCallback& aCallback,
00110 TInt aPriority,
00111 TMdaPriorityPreference aPref);
00112
00116 IMPORT_C static CDrmPlayerUtility* NewDesPlayerL(const TDesC8& aData,
00117 MDrmAudioPlayerCallback& aCallback,
00118 TInt aPriority,
00119 TMdaPriorityPreference aPref
00120 );
00121
00125 IMPORT_C static CDrmPlayerUtility* NewDesPlayerReadOnlyL(const TDesC8& aData,
00126 MDrmAudioPlayerCallback& aCallback,
00127 TInt aPriority,
00128 TMdaPriorityPreference aPref
00129 );
00130
00134 IMPORT_C ~CDrmPlayerUtility();
00135
00141 IMPORT_C void Play();
00142
00148 IMPORT_C void Stop();
00149
00156 IMPORT_C TInt Pause();
00157
00164 IMPORT_C void SetVolume(TInt aVolume
00165 );
00166
00178 IMPORT_C void SetRepeats(TInt aRepeatNumberOfTimes,
00179 const TTimeIntervalMicroSeconds& aTrailingSilence
00180 );
00181
00188 IMPORT_C void SetVolumeRamp(const TTimeIntervalMicroSeconds& aRampDuration);
00189
00190
00197 IMPORT_C const TTimeIntervalMicroSeconds& Duration();
00198
00205 IMPORT_C TInt MaxVolume();
00206
00213 IMPORT_C void OpenFileL(const TDesC& aFileName);
00214
00221 IMPORT_C void OpenFileL(const RFile& aFile);
00222
00229 IMPORT_C void OpenFileL(const TMMSource& aSource);
00230
00237 IMPORT_C void OpenDesL(const TDesC8& aDescriptor);
00238
00246 IMPORT_C void OpenUrlL(const TDesC& aUrl, TInt aIapId = KUseDefaultIap, const TDesC8& aMimeType=KNullDesC8);
00247
00253 IMPORT_C void Close();
00254
00262 IMPORT_C TInt GetPosition(TTimeIntervalMicroSeconds& aPosition);
00263
00271 IMPORT_C void SetPosition(const TTimeIntervalMicroSeconds& aPosition);
00272
00284 IMPORT_C TInt SetPriority(TInt aPriority, TMdaPriorityPreference aPref);
00285
00293 IMPORT_C TInt GetVolume(TInt& aVolume);
00294
00302 IMPORT_C TInt GetNumberOfMetaDataEntries(TInt& aNumEntries);
00303
00311 IMPORT_C CMMFMetaDataEntry* GetMetaDataEntryL(TInt aMetaDataIndex);
00312
00328 IMPORT_C TInt SetPlayWindow(const TTimeIntervalMicroSeconds& aStart,
00329 const TTimeIntervalMicroSeconds& aEnd);
00330
00337 IMPORT_C TInt ClearPlayWindow();
00338
00346 IMPORT_C TInt SetBalance(TInt aBalance = KMMFBalanceCenter);
00347
00355 IMPORT_C TInt GetBalance(TInt& aBalance);
00356
00364 IMPORT_C TInt GetBitRate(TUint& aBitRate);
00365
00372 IMPORT_C void RegisterForAudioLoadingNotification(MAudioLoadingObserver& aCallback);
00373
00380 IMPORT_C void GetAudioLoadingProgressL(TInt& aPercentageProgress);
00381
00388 IMPORT_C const CMMFControllerImplementationInformation& ControllerImplementationInformationL();
00389
00410 IMPORT_C TInt CustomCommandSync(const TMMFMessageDestinationPckg& aDestination, TInt aFunction, const TDesC8& aDataTo1, const TDesC8& aDataTo2, TDes8& aDataFrom);
00411
00429 IMPORT_C TInt CustomCommandSync(const TMMFMessageDestinationPckg& aDestination, TInt aFunction, const TDesC8& aDataTo1, const TDesC8& aDataTo2);
00430
00455 IMPORT_C void CustomCommandAsync(const TMMFMessageDestinationPckg& aDestination, TInt aFunction, const TDesC8& aDataTo1, const TDesC8& aDataTo2, TDes8& aDataFrom, TRequestStatus& aStatus);
00456
00477 IMPORT_C void CustomCommandAsync(const TMMFMessageDestinationPckg& aDestination, TInt aFunction, const TDesC8& aDataTo1, const TDesC8& aDataTo2, TRequestStatus& aStatus);
00478
00479 protected:
00483 CMMFDrmAudioPlayerUtility* iProperties;
00484
00485 };
00486
00487 #endif