sl@0: // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // This file contains integration tests of the MMF Audio Client. sl@0: // The enabling of agent's user interface and disabling automatic intent sl@0: // features are tested. sl@0: // CMdaAudioPlayerUtility sl@0: // sl@0: // sl@0: sl@0: #ifndef TEST_AUDIOPLAYERDRM_H sl@0: #define TEST_AUDIOPLAYERDRM_H sl@0: sl@0: #include "TSI_MMFACLNT.h" sl@0: sl@0: // Audio events sl@0: enum TMmfAudioEvents sl@0: { sl@0: EAudioOpen = 0, sl@0: EAudioPlay, sl@0: EAudioPlayEnd, sl@0: }; sl@0: sl@0: /** sl@0: * sl@0: * Base class sl@0: * sl@0: * @lib "TSI_MMFACLNT.lib" sl@0: * sl@0: * @class CTestMmfDRMAudioPlayerBase sl@0: * sl@0: */ sl@0: class CTestMmfDRMAudioPlayerBase : public CTestMmfAclntStep, sl@0: public MMdaAudioPlayerCallback sl@0: { sl@0: public: sl@0: void FsmL(TMmfAudioEvents aEvent, TInt aError = KErrNone); sl@0: sl@0: // from CTestMmfAclntStep sl@0: virtual TVerdict DoTestStepPreambleL(); sl@0: virtual TVerdict DoTestStepPostambleL(); sl@0: sl@0: // from MMdaAudioPlayerCallback sl@0: virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration); sl@0: virtual void MapcPlayComplete(TInt aError); sl@0: sl@0: public: sl@0: TInt iError; sl@0: TFileName iFileName; sl@0: CMdaAudioPlayerUtility* iAudioPlayer; sl@0: protected: sl@0: virtual void AfterOpenL(); sl@0: CTestMmfDRMAudioPlayerBase(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, const TDesC& aUniqueId); sl@0: sl@0: TBuf iSectName; // Section name for retrieving filename sl@0: TBuf iKeyName; // Key name for retrieving filename sl@0: TBuf iUniqueId; // Unique ID for DRM protected content sl@0: }; sl@0: sl@0: // Positive Tests sl@0: sl@0: /** sl@0: * sl@0: * Enable agent's user interface for errors and confirmation requests property. sl@0: * Open and play a protected audio clip from a file for PLAY intent. sl@0: * sl@0: * @lib "TSI_MMFACLNT.lib" sl@0: * sl@0: * @class CTestMmfAudioPlayDRMEnableAgentUI sl@0: * sl@0: */ sl@0: class CTestMmfAudioPlayDRMEnableAgentUI : public CTestMmfDRMAudioPlayerBase sl@0: { sl@0: public: sl@0: static CTestMmfAudioPlayDRMEnableAgentUI* NewL(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, const TDesC& aUniqueId); sl@0: sl@0: // from RTestStep sl@0: virtual TVerdict DoTestStepL(); sl@0: protected: sl@0: void AfterOpenL(); sl@0: sl@0: private: sl@0: CTestMmfAudioPlayDRMEnableAgentUI(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, const TDesC& aUniqueId); sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * sl@0: * Open a protected audio file and disable automatic intent. Play. sl@0: * sl@0: * @lib "TSI_MMFACLNT.lib" sl@0: * sl@0: * @class CTestMmfAudioPlayDRMDisableAutoIntent sl@0: * sl@0: */ sl@0: class CTestMmfAudioPlayDRMDisableAutoIntent : public CTestMmfDRMAudioPlayerBase sl@0: { sl@0: public: sl@0: static CTestMmfAudioPlayDRMDisableAutoIntent* NewL(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, const TDesC& aUniqueId); sl@0: sl@0: // from RTestStep sl@0: virtual TVerdict DoTestStepL(); sl@0: sl@0: protected: sl@0: void AfterOpenL(); sl@0: private: sl@0: CTestMmfAudioPlayDRMDisableAutoIntent(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, const TDesC& aUniqueId); sl@0: }; sl@0: sl@0: #endif //TEST_AUDIOPLAYERDRM_H