os/mm/mmlibs/mmfw/tsrc/mmvalidationsuite/mmvalidationsuiteagents/inc/audioplayagent.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 2005-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
// Part of the MVS Agents for TechView
sl@0
    15
//
sl@0
    16
sl@0
    17
#include <mdaaudiosampleplayer.h>
sl@0
    18
#include <mvs/agentsutility.h>
sl@0
    19
#include <flogger.h>
sl@0
    20
sl@0
    21
#ifndef MVSAUDIOPLAYAGENT_H
sl@0
    22
#define MVSAUDIOPLAYAGENT_H
sl@0
    23
sl@0
    24
/**
sl@0
    25
@publishedPartner
sl@0
    26
@prototype
sl@0
    27
@test
sl@0
    28
sl@0
    29
Provides Audio playing functionality for the UI/Client
sl@0
    30
sl@0
    31
*/
sl@0
    32
class CMVSAudioPlayAgent : public CBase, MMdaAudioPlayerCallback, MMMFAudioResourceNotificationCallback
sl@0
    33
	{
sl@0
    34
	public:
sl@0
    35
		IMPORT_C static CMVSAudioPlayAgent* NewL(MMVSClientObserver& aObserver);
sl@0
    36
		IMPORT_C ~CMVSAudioPlayAgent();
sl@0
    37
		
sl@0
    38
		//opens an audio clip for playback
sl@0
    39
		IMPORT_C void OpenFileL(TDesC& aFile);
sl@0
    40
		//opens DRM protected source
sl@0
    41
		IMPORT_C void OpenFileL(TMMSource &aSource); //Added for future support
sl@0
    42
        IMPORT_C void OpenDesL(const TDesC8 &aDescriptor); //Added for future support
sl@0
    43
        
sl@0
    44
		IMPORT_C void Play();
sl@0
    45
		IMPORT_C void Stop();
sl@0
    46
        IMPORT_C TInt  Pause();
sl@0
    47
        IMPORT_C void Forward(); //Added for future support
sl@0
    48
        IMPORT_C void Rewind(); //Added for future support
sl@0
    49
        
sl@0
    50
      	//Setter Methods
sl@0
    51
      	
sl@0
    52
        IMPORT_C void SetVolume(TInt aVolume, TTimeIntervalMicroSeconds aRamp);
sl@0
    53
        IMPORT_C void SetPosition(TTimeIntervalMicroSeconds aPosition);
sl@0
    54
        IMPORT_C void SetRepeats(TInt aNoRepeats, TTimeIntervalMicroSeconds aDelay);
sl@0
    55
        IMPORT_C TInt SetBalance(TInt aBalance);
sl@0
    56
		IMPORT_C TInt SetPlayWindow(TTimeIntervalMicroSeconds aStart, TTimeIntervalMicroSeconds    aEnd);
sl@0
    57
        IMPORT_C TInt SetPriority(TInt aPriority, TMdaPriorityPreference aPref);
sl@0
    58
        IMPORT_C TInt ClearPlayWindow();
sl@0
    59
         
sl@0
    60
	    //closes the current audio clip
sl@0
    61
	   
sl@0
    62
        IMPORT_C void Reset();
sl@0
    63
        IMPORT_C void SetAutoPauseResume(TBool aEnable);
sl@0
    64
        
sl@0
    65
        //Getter Methods
sl@0
    66
        
sl@0
    67
        IMPORT_C TTimeIntervalMicroSeconds GetPosition(TTimeIntervalMicroSeconds& aPosition);
sl@0
    68
        IMPORT_C TInt GetVolume(TInt& aVolume);
sl@0
    69
        IMPORT_C TInt MaxVolume();
sl@0
    70
        IMPORT_C TTimeIntervalMicroSeconds Duration();
sl@0
    71
        IMPORT_C TInt GetBalance(TInt& aBalance);
sl@0
    72
        IMPORT_C void GetMetaArrayL(RPointerArray<CMMFMetaDataEntry>& aMetaarray);
sl@0
    73
        IMPORT_C TInt GetBitRate(TUint& aBitRate);
sl@0
    74
        
sl@0
    75
        //Returns Implementation Info object of the controller is currently loaded
sl@0
    76
        
sl@0
    77
        IMPORT_C const CMMFControllerImplementationInformation& GetControllerInfoL();
sl@0
    78
        IMPORT_C TMVSState GetState();
sl@0
    79
    private:
sl@0
    80
		void ConstructL();//create playerutility here
sl@0
    81
    	CMVSAudioPlayAgent(MMVSClientObserver& aObserver);
sl@0
    82
    
sl@0
    83
		//from MMdaAudioPlayerCallback
sl@0
    84
		
sl@0
    85
		void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds &aDuration);
sl@0
    86
		void MapcPlayComplete(TInt aError);
sl@0
    87
	
sl@0
    88
		//from MMMFAudioResourceNotificationCallback
sl@0
    89
		
sl@0
    90
		void MarncResourceAvailable(TUid aNotificationEventId, const TDesC8& aNotificationData);
sl@0
    91
	private:
sl@0
    92
		CMdaAudioPlayerUtility* iPlayer;
sl@0
    93
		MMVSClientObserver& iObserver;
sl@0
    94
		TMVSState iState;
sl@0
    95
    	RFileLogger iFileLogger;
sl@0
    96
	};
sl@0
    97
sl@0
    98
#endif MVSAUDIOPLAYAGENT_H