os/mm/mmlibs/mmfw/tsrc/mmvalidationsuite/mmvalidationsuiteagents/inc/audioplayagent.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.
     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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // Part of the MVS Agents for TechView
    15 //
    16 
    17 #include <mdaaudiosampleplayer.h>
    18 #include <mvs/agentsutility.h>
    19 #include <flogger.h>
    20 
    21 #ifndef MVSAUDIOPLAYAGENT_H
    22 #define MVSAUDIOPLAYAGENT_H
    23 
    24 /**
    25 @publishedPartner
    26 @prototype
    27 @test
    28 
    29 Provides Audio playing functionality for the UI/Client
    30 
    31 */
    32 class CMVSAudioPlayAgent : public CBase, MMdaAudioPlayerCallback, MMMFAudioResourceNotificationCallback
    33 	{
    34 	public:
    35 		IMPORT_C static CMVSAudioPlayAgent* NewL(MMVSClientObserver& aObserver);
    36 		IMPORT_C ~CMVSAudioPlayAgent();
    37 		
    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
    43         
    44 		IMPORT_C void Play();
    45 		IMPORT_C void Stop();
    46         IMPORT_C TInt  Pause();
    47         IMPORT_C void Forward(); //Added for future support
    48         IMPORT_C void Rewind(); //Added for future support
    49         
    50       	//Setter Methods
    51       	
    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();
    59          
    60 	    //closes the current audio clip
    61 	   
    62         IMPORT_C void Reset();
    63         IMPORT_C void SetAutoPauseResume(TBool aEnable);
    64         
    65         //Getter Methods
    66         
    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);
    74         
    75         //Returns Implementation Info object of the controller is currently loaded
    76         
    77         IMPORT_C const CMMFControllerImplementationInformation& GetControllerInfoL();
    78         IMPORT_C TMVSState GetState();
    79     private:
    80 		void ConstructL();//create playerutility here
    81     	CMVSAudioPlayAgent(MMVSClientObserver& aObserver);
    82     
    83 		//from MMdaAudioPlayerCallback
    84 		
    85 		void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds &aDuration);
    86 		void MapcPlayComplete(TInt aError);
    87 	
    88 		//from MMMFAudioResourceNotificationCallback
    89 		
    90 		void MarncResourceAvailable(TUid aNotificationEventId, const TDesC8& aNotificationData);
    91 	private:
    92 		CMdaAudioPlayerUtility* iPlayer;
    93 		MMVSClientObserver& iObserver;
    94 		TMVSState iState;
    95     	RFileLogger iFileLogger;
    96 	};
    97 
    98 #endif MVSAUDIOPLAYAGENT_H