First public contribution.
2 * Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: DRM Audio player
27 #include <mmfcontrollerframeworkbase.h>
29 #include <mmfcontrollerpluginresolver.h>
30 #include <mmfcontrollerframework.h>
31 #include <mmfstandardcustomcommands.h>
32 #include "mmfdrmSession.h"
34 class CDrm: public CActive
39 * Two-phased constructor.
41 static CDrm* NewL(TInt aPriority);
43 * Two-phased constructor.
45 static CDrm* NewLC(TInt aPriority);
53 void SetVolume(TInt aVolume);
54 void SetRepeats(TInt aRepeatNumberOfTimes, const TTimeIntervalMicroSeconds& aTrailingSilence);
55 void SetVolumeRamp(const TTimeIntervalMicroSeconds& aRampDuration);
56 const TTimeIntervalMicroSeconds& Duration();
58 void OpenFileL(const TDesC& aFileName);
59 void OpenFileL(const RFile& aFile);
60 void OpenFileL(const TMMSource& aSource);
61 void OpenDesL(const TDesC8& aDescriptor);
62 void OpenUrlL(const TDesC& aUrl, TInt aIapId = KUseDefaultIap, const TDesC8& aMimeType=KNullDesC8);
65 TInt GetPosition(TTimeIntervalMicroSeconds& aPosition);
66 void SetPosition(const TTimeIntervalMicroSeconds& aPosition);
67 TInt SetPriority(TInt aPriority, TMdaPriorityPreference aPref);
68 TInt GetVolume(TInt& aVolume);
69 TInt GetNumberOfMetaDataEntries(TInt& aNumEntries);
70 CMMFMetaDataEntry* GetMetaDataEntryL(TInt aMetaDataIndex);
71 TInt SetPlayWindow(const TTimeIntervalMicroSeconds& aStart,
72 const TTimeIntervalMicroSeconds& aEnd);
73 TInt ClearPlayWindow();
74 TInt SetBalance(TInt aBalance = KMMFBalanceCenter);
75 TInt GetBalance(TInt& aBalance);
76 void RegisterForAudioLoadingNotification(MAudioLoadingObserver& aCallback);
77 void GetAudioLoadingProgressL(TInt& aPercentageComplete);
78 const CMMFControllerImplementationInformation& ControllerImplementationInformationL();
79 TInt CustomCommandSync(const TMMFMessageDestinationPckg& aDestination, TInt aFunction, const TDesC8& aDataTo1, const TDesC8& aDataTo2, TDes8& aDataFrom);
80 TInt CustomCommandSync(const TMMFMessageDestinationPckg& aDestination, TInt aFunction, const TDesC8& aDataTo1, const TDesC8& aDataTo2);
81 void CustomCommandAsync(const TMMFMessageDestinationPckg& aDestination, TInt aFunction, const TDesC8& aDataTo1, const TDesC8& aDataTo2, TDes8& aDataFrom, TRequestStatus& aStatus);
82 void CustomCommandAsync(const TMMFMessageDestinationPckg& aDestination, TInt aFunction, const TDesC8& aDataTo1, const TDesC8& aDataTo2, TRequestStatus& aStatus);
83 TInt GetBitRate(TUint& aBitRate);
85 //inherited from CActive
94 // 2nd phase construction.
95 void ConstructL (void);
120 EStateGetNumberOfMetaDataEntries,
121 EStateGetMetaDataEntry,
123 EStateClearPlayWindow,
126 EStateRegisterForAudioLoadingNotification,
127 EStateGetAudioLoadingProgress,
128 EStateControllerImplementationInformation,
129 EStateCustomCommandSync,
130 EStateCustomCommandSync2,
131 EStateCustomCommandAsync,
132 EStateCustomCommandAsync2,