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: // Header file: Basic tests. sl@0: // sl@0: // sl@0: sl@0: /** sl@0: @file TestPlayerUtils.h sl@0: */ sl@0: sl@0: #ifndef __TESTDRM_H__ sl@0: #define __TESTDRM_H__ sl@0: sl@0: sl@0: #include "TSI_MMFACLNT.h" sl@0: sl@0: sl@0: /** sl@0: * Load and initialise an audio file. sl@0: * sl@0: * @class CTestMmfAclntDRMPlayerNoRights sl@0: * sl@0: */ sl@0: class CTestMmfAclntDRMPlayerNoRights : public CTestMmfAclntStep, public MMdaAudioPlayerCallback sl@0: { sl@0: public: sl@0: static CTestMmfAclntDRMPlayerNoRights* NewL(); sl@0: static CTestMmfAclntDRMPlayerNoRights* NewLC(); sl@0: virtual TVerdict DoTestStepL(); 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: private: sl@0: CTestMmfAclntDRMPlayerNoRights(); sl@0: sl@0: private: sl@0: TInt iError; sl@0: TTimeIntervalMicroSeconds iDuration;// Stores duration of audio sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * Load and initialise an audio file. sl@0: * sl@0: * @class CTestMmfAclntDRMPlayerRightsCount sl@0: * sl@0: */ sl@0: class CTestMmfAclntDRMPlayerRightsCount : public CTestMmfAclntStep, public MMdaAudioPlayerCallback sl@0: { sl@0: public: sl@0: static CTestMmfAclntDRMPlayerRightsCount* NewL(); sl@0: static CTestMmfAclntDRMPlayerRightsCount* NewLC(); sl@0: virtual TVerdict DoTestStepL(); 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: private: sl@0: CTestMmfAclntDRMPlayerRightsCount(); sl@0: sl@0: private: sl@0: TInt iError; sl@0: TTimeIntervalMicroSeconds iDuration;// Stores duration of audio sl@0: }; sl@0: sl@0: sl@0: sl@0: /** sl@0: * Load and initialise an audio file. sl@0: * sl@0: * @class CTestMmfAclntDRMRecorderNoRights sl@0: * sl@0: */ sl@0: class CTestMmfAclntDRMRecorderNoRights : public CTestMmfAclntStep, public MMdaObjectStateChangeObserver sl@0: { sl@0: public: sl@0: static CTestMmfAclntDRMRecorderNoRights* NewL(); sl@0: static CTestMmfAclntDRMRecorderNoRights* NewLC(); sl@0: virtual TVerdict DoTestStepL(); sl@0: // from MMdaObjectStateChangeObserver sl@0: virtual void MoscoStateChangeEvent(CBase* aObject,TInt aPreviousState,TInt aCurrentState, TInt aErrorCode); sl@0: sl@0: private: sl@0: CTestMmfAclntDRMRecorderNoRights(); sl@0: sl@0: private: sl@0: TInt iPreviousState; sl@0: TInt iCurrentState; sl@0: TInt iError; sl@0: TTimeIntervalMicroSeconds iDuration;// Stores duration of audio sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * Load and initialise an audio file. sl@0: * sl@0: * @class CTestMmfAclntDRMRecorderRightsCount sl@0: * sl@0: */ sl@0: class CTestMmfAclntDRMRecorderRightsCount : public CTestMmfAclntStep, public MMdaObjectStateChangeObserver sl@0: { sl@0: public: sl@0: static CTestMmfAclntDRMRecorderRightsCount* NewL(); sl@0: static CTestMmfAclntDRMRecorderRightsCount* NewLC(); sl@0: virtual TVerdict DoTestStepL(); sl@0: // from MMdaObjectStateChangeObserver sl@0: virtual void MoscoStateChangeEvent(CBase* aObject,TInt aPreviousState,TInt aCurrentState, TInt aErrorCode); sl@0: sl@0: private: sl@0: CTestMmfAclntDRMRecorderRightsCount(); sl@0: sl@0: private: sl@0: TInt iPreviousState; sl@0: TInt iCurrentState; sl@0: TInt iError; sl@0: TTimeIntervalMicroSeconds iDuration;// Stores duration of audio sl@0: }; sl@0: sl@0: /** sl@0: * Load and initialise an audio file. sl@0: * sl@0: * @class CTestMmfAclntDRMPlayerOpen sl@0: * sl@0: */ sl@0: class CTestMmfAclntDRMPlayerOpen : public CTestMmfAclntStep, public MMdaAudioPlayerCallback sl@0: { sl@0: public: sl@0: static CTestMmfAclntDRMPlayerOpen* NewL(); sl@0: static CTestMmfAclntDRMPlayerOpen* NewLC(); sl@0: virtual TVerdict DoTestStepL(); 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: private: sl@0: CTestMmfAclntDRMPlayerOpen(); sl@0: sl@0: private: sl@0: TInt iError; sl@0: TTimeIntervalMicroSeconds iDuration;// Stores duration of audio sl@0: }; sl@0: sl@0: /** sl@0: * Load and initialise an audio file. sl@0: * sl@0: * @class CTestMmfAclntDRMRecorderPlay sl@0: * sl@0: */ sl@0: class CTestMmfAclntDRMRecorderPlay : public CTestMmfAclntStep, public MMdaObjectStateChangeObserver sl@0: { sl@0: public: sl@0: static CTestMmfAclntDRMRecorderPlay* NewL(); sl@0: static CTestMmfAclntDRMRecorderPlay* NewLC(); sl@0: virtual TVerdict DoTestStepL(); sl@0: // from MMdaObjectStateChangeObserver sl@0: virtual void MoscoStateChangeEvent(CBase* aObject,TInt aPreviousState,TInt aCurrentState, TInt aErrorCode); sl@0: sl@0: private: sl@0: CTestMmfAclntDRMRecorderPlay(); sl@0: sl@0: private: sl@0: TInt iPreviousState; sl@0: TInt iCurrentState; sl@0: TInt iError; sl@0: TTimeIntervalMicroSeconds iDuration;// Stores duration of audio sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * Test that Audio conversion fails for protected files sl@0: * sl@0: * @class CTestMmfAclntDRMConverterFail sl@0: * sl@0: */ sl@0: class CTestMmfAclntDRMConverterFail : public CTestMmfAclntStep, public MMdaObjectStateChangeObserver sl@0: { sl@0: public: sl@0: static CTestMmfAclntDRMConverterFail* NewL(); sl@0: static CTestMmfAclntDRMConverterFail* NewLC(); sl@0: virtual TVerdict DoTestStepL(); sl@0: // from MMdaObjectStateChangeObserver sl@0: virtual void MoscoStateChangeEvent(CBase* aObject,TInt aPreviousState,TInt aCurrentState, TInt aErrorCode); sl@0: sl@0: private: sl@0: CTestMmfAclntDRMConverterFail(); sl@0: sl@0: private: sl@0: TInt iPreviousState; sl@0: TInt iCurrentState; sl@0: TInt iError; sl@0: TTimeIntervalMicroSeconds iDuration;// Stores duration of audio sl@0: }; sl@0: sl@0: #endif // __TESTDRM_H__