1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmlibs/mmfw/tsrc/mmfintegrationtest/ACLNT/TestDRM.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,206 @@
1.4 +// Copyright (c) 2004-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 +// Header file: Basic tests.
1.18 +//
1.19 +//
1.20 +
1.21 +/**
1.22 + @file TestPlayerUtils.h
1.23 +*/
1.24 +
1.25 +#ifndef __TESTDRM_H__
1.26 +#define __TESTDRM_H__
1.27 +
1.28 +
1.29 +#include "TSI_MMFACLNT.h"
1.30 +
1.31 +
1.32 +/**
1.33 + * Load and initialise an audio file.
1.34 + *
1.35 + * @class CTestMmfAclntDRMPlayerNoRights
1.36 + *
1.37 + */
1.38 +class CTestMmfAclntDRMPlayerNoRights : public CTestMmfAclntStep, public MMdaAudioPlayerCallback
1.39 + {
1.40 +public:
1.41 + static CTestMmfAclntDRMPlayerNoRights* NewL();
1.42 + static CTestMmfAclntDRMPlayerNoRights* NewLC();
1.43 + virtual TVerdict DoTestStepL();
1.44 + // from MMdaAudioPlayerCallback
1.45 + virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
1.46 + virtual void MapcPlayComplete(TInt aError);
1.47 +
1.48 +private:
1.49 + CTestMmfAclntDRMPlayerNoRights();
1.50 +
1.51 +private:
1.52 + TInt iError;
1.53 + TTimeIntervalMicroSeconds iDuration;// Stores duration of audio
1.54 + };
1.55 +
1.56 +
1.57 +/**
1.58 + * Load and initialise an audio file.
1.59 + *
1.60 + * @class CTestMmfAclntDRMPlayerRightsCount
1.61 + *
1.62 + */
1.63 +class CTestMmfAclntDRMPlayerRightsCount : public CTestMmfAclntStep, public MMdaAudioPlayerCallback
1.64 + {
1.65 +public:
1.66 + static CTestMmfAclntDRMPlayerRightsCount* NewL();
1.67 + static CTestMmfAclntDRMPlayerRightsCount* NewLC();
1.68 + virtual TVerdict DoTestStepL();
1.69 + // from MMdaAudioPlayerCallback
1.70 + virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
1.71 + virtual void MapcPlayComplete(TInt aError);
1.72 +
1.73 +private:
1.74 + CTestMmfAclntDRMPlayerRightsCount();
1.75 +
1.76 +private:
1.77 + TInt iError;
1.78 + TTimeIntervalMicroSeconds iDuration;// Stores duration of audio
1.79 + };
1.80 +
1.81 +
1.82 +
1.83 +/**
1.84 + * Load and initialise an audio file.
1.85 + *
1.86 + * @class CTestMmfAclntDRMRecorderNoRights
1.87 + *
1.88 + */
1.89 +class CTestMmfAclntDRMRecorderNoRights : public CTestMmfAclntStep, public MMdaObjectStateChangeObserver
1.90 + {
1.91 +public:
1.92 + static CTestMmfAclntDRMRecorderNoRights* NewL();
1.93 + static CTestMmfAclntDRMRecorderNoRights* NewLC();
1.94 + virtual TVerdict DoTestStepL();
1.95 + // from MMdaObjectStateChangeObserver
1.96 + virtual void MoscoStateChangeEvent(CBase* aObject,TInt aPreviousState,TInt aCurrentState, TInt aErrorCode);
1.97 +
1.98 +private:
1.99 + CTestMmfAclntDRMRecorderNoRights();
1.100 +
1.101 +private:
1.102 + TInt iPreviousState;
1.103 + TInt iCurrentState;
1.104 + TInt iError;
1.105 + TTimeIntervalMicroSeconds iDuration;// Stores duration of audio
1.106 + };
1.107 +
1.108 +
1.109 +/**
1.110 + * Load and initialise an audio file.
1.111 + *
1.112 + * @class CTestMmfAclntDRMRecorderRightsCount
1.113 + *
1.114 + */
1.115 +class CTestMmfAclntDRMRecorderRightsCount : public CTestMmfAclntStep, public MMdaObjectStateChangeObserver
1.116 + {
1.117 +public:
1.118 + static CTestMmfAclntDRMRecorderRightsCount* NewL();
1.119 + static CTestMmfAclntDRMRecorderRightsCount* NewLC();
1.120 + virtual TVerdict DoTestStepL();
1.121 + // from MMdaObjectStateChangeObserver
1.122 + virtual void MoscoStateChangeEvent(CBase* aObject,TInt aPreviousState,TInt aCurrentState, TInt aErrorCode);
1.123 +
1.124 +private:
1.125 + CTestMmfAclntDRMRecorderRightsCount();
1.126 +
1.127 +private:
1.128 + TInt iPreviousState;
1.129 + TInt iCurrentState;
1.130 + TInt iError;
1.131 + TTimeIntervalMicroSeconds iDuration;// Stores duration of audio
1.132 + };
1.133 +
1.134 +/**
1.135 + * Load and initialise an audio file.
1.136 + *
1.137 + * @class CTestMmfAclntDRMPlayerOpen
1.138 + *
1.139 + */
1.140 +class CTestMmfAclntDRMPlayerOpen : public CTestMmfAclntStep, public MMdaAudioPlayerCallback
1.141 + {
1.142 +public:
1.143 + static CTestMmfAclntDRMPlayerOpen* NewL();
1.144 + static CTestMmfAclntDRMPlayerOpen* NewLC();
1.145 + virtual TVerdict DoTestStepL();
1.146 + // from MMdaAudioPlayerCallback
1.147 + virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
1.148 + virtual void MapcPlayComplete(TInt aError);
1.149 +
1.150 +private:
1.151 + CTestMmfAclntDRMPlayerOpen();
1.152 +
1.153 +private:
1.154 + TInt iError;
1.155 + TTimeIntervalMicroSeconds iDuration;// Stores duration of audio
1.156 + };
1.157 +
1.158 +/**
1.159 + * Load and initialise an audio file.
1.160 + *
1.161 + * @class CTestMmfAclntDRMRecorderPlay
1.162 + *
1.163 + */
1.164 +class CTestMmfAclntDRMRecorderPlay : public CTestMmfAclntStep, public MMdaObjectStateChangeObserver
1.165 + {
1.166 +public:
1.167 + static CTestMmfAclntDRMRecorderPlay* NewL();
1.168 + static CTestMmfAclntDRMRecorderPlay* NewLC();
1.169 + virtual TVerdict DoTestStepL();
1.170 + // from MMdaObjectStateChangeObserver
1.171 + virtual void MoscoStateChangeEvent(CBase* aObject,TInt aPreviousState,TInt aCurrentState, TInt aErrorCode);
1.172 +
1.173 +private:
1.174 + CTestMmfAclntDRMRecorderPlay();
1.175 +
1.176 +private:
1.177 + TInt iPreviousState;
1.178 + TInt iCurrentState;
1.179 + TInt iError;
1.180 + TTimeIntervalMicroSeconds iDuration;// Stores duration of audio
1.181 + };
1.182 +
1.183 +
1.184 +/**
1.185 + * Test that Audio conversion fails for protected files
1.186 + *
1.187 + * @class CTestMmfAclntDRMConverterFail
1.188 + *
1.189 + */
1.190 +class CTestMmfAclntDRMConverterFail : public CTestMmfAclntStep, public MMdaObjectStateChangeObserver
1.191 + {
1.192 +public:
1.193 + static CTestMmfAclntDRMConverterFail* NewL();
1.194 + static CTestMmfAclntDRMConverterFail* NewLC();
1.195 + virtual TVerdict DoTestStepL();
1.196 + // from MMdaObjectStateChangeObserver
1.197 + virtual void MoscoStateChangeEvent(CBase* aObject,TInt aPreviousState,TInt aCurrentState, TInt aErrorCode);
1.198 +
1.199 +private:
1.200 + CTestMmfAclntDRMConverterFail();
1.201 +
1.202 +private:
1.203 + TInt iPreviousState;
1.204 + TInt iCurrentState;
1.205 + TInt iError;
1.206 + TTimeIntervalMicroSeconds iDuration;// Stores duration of audio
1.207 + };
1.208 +
1.209 +#endif // __TESTDRM_H__