os/mm/mmlibs/mmfw/tsrc/mmvalidationsuite/mmvalidationsuiteagents/inc/audioplayagent.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmlibs/mmfw/tsrc/mmvalidationsuite/mmvalidationsuiteagents/inc/audioplayagent.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,98 @@
1.4 +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// Part of the MVS Agents for TechView
1.18 +//
1.19 +
1.20 +#include <mdaaudiosampleplayer.h>
1.21 +#include <mvs/agentsutility.h>
1.22 +#include <flogger.h>
1.23 +
1.24 +#ifndef MVSAUDIOPLAYAGENT_H
1.25 +#define MVSAUDIOPLAYAGENT_H
1.26 +
1.27 +/**
1.28 +@publishedPartner
1.29 +@prototype
1.30 +@test
1.31 +
1.32 +Provides Audio playing functionality for the UI/Client
1.33 +
1.34 +*/
1.35 +class CMVSAudioPlayAgent : public CBase, MMdaAudioPlayerCallback, MMMFAudioResourceNotificationCallback
1.36 + {
1.37 + public:
1.38 + IMPORT_C static CMVSAudioPlayAgent* NewL(MMVSClientObserver& aObserver);
1.39 + IMPORT_C ~CMVSAudioPlayAgent();
1.40 +
1.41 + //opens an audio clip for playback
1.42 + IMPORT_C void OpenFileL(TDesC& aFile);
1.43 + //opens DRM protected source
1.44 + IMPORT_C void OpenFileL(TMMSource &aSource); //Added for future support
1.45 + IMPORT_C void OpenDesL(const TDesC8 &aDescriptor); //Added for future support
1.46 +
1.47 + IMPORT_C void Play();
1.48 + IMPORT_C void Stop();
1.49 + IMPORT_C TInt Pause();
1.50 + IMPORT_C void Forward(); //Added for future support
1.51 + IMPORT_C void Rewind(); //Added for future support
1.52 +
1.53 + //Setter Methods
1.54 +
1.55 + IMPORT_C void SetVolume(TInt aVolume, TTimeIntervalMicroSeconds aRamp);
1.56 + IMPORT_C void SetPosition(TTimeIntervalMicroSeconds aPosition);
1.57 + IMPORT_C void SetRepeats(TInt aNoRepeats, TTimeIntervalMicroSeconds aDelay);
1.58 + IMPORT_C TInt SetBalance(TInt aBalance);
1.59 + IMPORT_C TInt SetPlayWindow(TTimeIntervalMicroSeconds aStart, TTimeIntervalMicroSeconds aEnd);
1.60 + IMPORT_C TInt SetPriority(TInt aPriority, TMdaPriorityPreference aPref);
1.61 + IMPORT_C TInt ClearPlayWindow();
1.62 +
1.63 + //closes the current audio clip
1.64 +
1.65 + IMPORT_C void Reset();
1.66 + IMPORT_C void SetAutoPauseResume(TBool aEnable);
1.67 +
1.68 + //Getter Methods
1.69 +
1.70 + IMPORT_C TTimeIntervalMicroSeconds GetPosition(TTimeIntervalMicroSeconds& aPosition);
1.71 + IMPORT_C TInt GetVolume(TInt& aVolume);
1.72 + IMPORT_C TInt MaxVolume();
1.73 + IMPORT_C TTimeIntervalMicroSeconds Duration();
1.74 + IMPORT_C TInt GetBalance(TInt& aBalance);
1.75 + IMPORT_C void GetMetaArrayL(RPointerArray<CMMFMetaDataEntry>& aMetaarray);
1.76 + IMPORT_C TInt GetBitRate(TUint& aBitRate);
1.77 +
1.78 + //Returns Implementation Info object of the controller is currently loaded
1.79 +
1.80 + IMPORT_C const CMMFControllerImplementationInformation& GetControllerInfoL();
1.81 + IMPORT_C TMVSState GetState();
1.82 + private:
1.83 + void ConstructL();//create playerutility here
1.84 + CMVSAudioPlayAgent(MMVSClientObserver& aObserver);
1.85 +
1.86 + //from MMdaAudioPlayerCallback
1.87 +
1.88 + void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds &aDuration);
1.89 + void MapcPlayComplete(TInt aError);
1.90 +
1.91 + //from MMMFAudioResourceNotificationCallback
1.92 +
1.93 + void MarncResourceAvailable(TUid aNotificationEventId, const TDesC8& aNotificationData);
1.94 + private:
1.95 + CMdaAudioPlayerUtility* iPlayer;
1.96 + MMVSClientObserver& iObserver;
1.97 + TMVSState iState;
1.98 + RFileLogger iFileLogger;
1.99 + };
1.100 +
1.101 +#endif MVSAUDIOPLAYAGENT_H