os/mm/mmlibs/mmfw/tsrc/mmvalidationsuite/mmvalidationsuiteagents/inc/audioplayagent.h
First public contribution.
1 // Copyright (c) 2005-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 // Part of the MVS Agents for TechView
17 #include <mdaaudiosampleplayer.h>
18 #include <mvs/agentsutility.h>
21 #ifndef MVSAUDIOPLAYAGENT_H
22 #define MVSAUDIOPLAYAGENT_H
29 Provides Audio playing functionality for the UI/Client
32 class CMVSAudioPlayAgent : public CBase, MMdaAudioPlayerCallback, MMMFAudioResourceNotificationCallback
35 IMPORT_C static CMVSAudioPlayAgent* NewL(MMVSClientObserver& aObserver);
36 IMPORT_C ~CMVSAudioPlayAgent();
38 //opens an audio clip for playback
39 IMPORT_C void OpenFileL(TDesC& aFile);
40 //opens DRM protected source
41 IMPORT_C void OpenFileL(TMMSource &aSource); //Added for future support
42 IMPORT_C void OpenDesL(const TDesC8 &aDescriptor); //Added for future support
46 IMPORT_C TInt Pause();
47 IMPORT_C void Forward(); //Added for future support
48 IMPORT_C void Rewind(); //Added for future support
52 IMPORT_C void SetVolume(TInt aVolume, TTimeIntervalMicroSeconds aRamp);
53 IMPORT_C void SetPosition(TTimeIntervalMicroSeconds aPosition);
54 IMPORT_C void SetRepeats(TInt aNoRepeats, TTimeIntervalMicroSeconds aDelay);
55 IMPORT_C TInt SetBalance(TInt aBalance);
56 IMPORT_C TInt SetPlayWindow(TTimeIntervalMicroSeconds aStart, TTimeIntervalMicroSeconds aEnd);
57 IMPORT_C TInt SetPriority(TInt aPriority, TMdaPriorityPreference aPref);
58 IMPORT_C TInt ClearPlayWindow();
60 //closes the current audio clip
62 IMPORT_C void Reset();
63 IMPORT_C void SetAutoPauseResume(TBool aEnable);
67 IMPORT_C TTimeIntervalMicroSeconds GetPosition(TTimeIntervalMicroSeconds& aPosition);
68 IMPORT_C TInt GetVolume(TInt& aVolume);
69 IMPORT_C TInt MaxVolume();
70 IMPORT_C TTimeIntervalMicroSeconds Duration();
71 IMPORT_C TInt GetBalance(TInt& aBalance);
72 IMPORT_C void GetMetaArrayL(RPointerArray<CMMFMetaDataEntry>& aMetaarray);
73 IMPORT_C TInt GetBitRate(TUint& aBitRate);
75 //Returns Implementation Info object of the controller is currently loaded
77 IMPORT_C const CMMFControllerImplementationInformation& GetControllerInfoL();
78 IMPORT_C TMVSState GetState();
80 void ConstructL();//create playerutility here
81 CMVSAudioPlayAgent(MMVSClientObserver& aObserver);
83 //from MMdaAudioPlayerCallback
85 void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds &aDuration);
86 void MapcPlayComplete(TInt aError);
88 //from MMMFAudioResourceNotificationCallback
90 void MarncResourceAvailable(TUid aNotificationEventId, const TDesC8& aNotificationData);
92 CMdaAudioPlayerUtility* iPlayer;
93 MMVSClientObserver& iObserver;
95 RFileLogger iFileLogger;
98 #endif MVSAUDIOPLAYAGENT_H