mmlibs/mmfw/tsrc/mmfintegrationtest/ACLNT/TestDRM.h
changeset 0 40261b775718
equal deleted inserted replaced
-1:000000000000 0:40261b775718
       
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Header file: Basic  tests.
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file TestPlayerUtils.h
       
    20 */
       
    21 
       
    22 #ifndef __TESTDRM_H__
       
    23 #define __TESTDRM_H__
       
    24 
       
    25 
       
    26 #include "TSI_MMFACLNT.h"
       
    27 
       
    28 
       
    29 /**
       
    30  * Load and initialise an audio file.
       
    31  *
       
    32  * @class CTestMmfAclntDRMPlayerNoRights
       
    33  *
       
    34  */         
       
    35 class CTestMmfAclntDRMPlayerNoRights :  public CTestMmfAclntStep, public MMdaAudioPlayerCallback
       
    36 	{
       
    37 public:
       
    38 	static CTestMmfAclntDRMPlayerNoRights* NewL();
       
    39 	static CTestMmfAclntDRMPlayerNoRights* NewLC();
       
    40 	virtual TVerdict DoTestStepL();
       
    41 	// from MMdaAudioPlayerCallback
       
    42     virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
       
    43     virtual void MapcPlayComplete(TInt aError);
       
    44 
       
    45 private:
       
    46 	CTestMmfAclntDRMPlayerNoRights();
       
    47 	
       
    48 private:
       
    49 	TInt iError;
       
    50 	TTimeIntervalMicroSeconds iDuration;// Stores duration of audio
       
    51 	};
       
    52 
       
    53 
       
    54 /**
       
    55  * Load and initialise an audio file.
       
    56  *
       
    57  * @class CTestMmfAclntDRMPlayerRightsCount
       
    58  *
       
    59  */         
       
    60 class CTestMmfAclntDRMPlayerRightsCount :  public CTestMmfAclntStep, public MMdaAudioPlayerCallback
       
    61 	{
       
    62 public:
       
    63 	static CTestMmfAclntDRMPlayerRightsCount* NewL();
       
    64 	static CTestMmfAclntDRMPlayerRightsCount* NewLC();
       
    65 	virtual TVerdict DoTestStepL();
       
    66 	// from MMdaAudioPlayerCallback
       
    67     virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
       
    68     virtual void MapcPlayComplete(TInt aError);
       
    69 
       
    70 private:
       
    71 	CTestMmfAclntDRMPlayerRightsCount();
       
    72 	
       
    73 private:
       
    74 	TInt iError;
       
    75 	TTimeIntervalMicroSeconds iDuration;// Stores duration of audio
       
    76 	};
       
    77 
       
    78 
       
    79 
       
    80 /**
       
    81  * Load and initialise an audio file.
       
    82  *
       
    83  * @class CTestMmfAclntDRMRecorderNoRights
       
    84  *
       
    85  */         
       
    86 class CTestMmfAclntDRMRecorderNoRights :  public CTestMmfAclntStep, public MMdaObjectStateChangeObserver
       
    87 	{
       
    88 public:
       
    89 	static CTestMmfAclntDRMRecorderNoRights* NewL();
       
    90 	static CTestMmfAclntDRMRecorderNoRights* NewLC();
       
    91 	virtual TVerdict DoTestStepL();
       
    92 	// from MMdaObjectStateChangeObserver
       
    93     virtual void MoscoStateChangeEvent(CBase* aObject,TInt aPreviousState,TInt aCurrentState, TInt aErrorCode);
       
    94 
       
    95 private:
       
    96 	CTestMmfAclntDRMRecorderNoRights();
       
    97 	
       
    98 private:
       
    99 	TInt iPreviousState;
       
   100 	TInt iCurrentState;
       
   101 	TInt iError;
       
   102 	TTimeIntervalMicroSeconds iDuration;// Stores duration of audio
       
   103 	};
       
   104 
       
   105 
       
   106 /**
       
   107  * Load and initialise an audio file.
       
   108  *
       
   109  * @class CTestMmfAclntDRMRecorderRightsCount
       
   110  *
       
   111  */         
       
   112 class CTestMmfAclntDRMRecorderRightsCount :  public CTestMmfAclntStep, public MMdaObjectStateChangeObserver
       
   113 	{
       
   114 public:
       
   115 	static CTestMmfAclntDRMRecorderRightsCount* NewL();
       
   116 	static CTestMmfAclntDRMRecorderRightsCount* NewLC();
       
   117 	virtual TVerdict DoTestStepL();
       
   118 	// from MMdaObjectStateChangeObserver
       
   119     virtual void MoscoStateChangeEvent(CBase* aObject,TInt aPreviousState,TInt aCurrentState, TInt aErrorCode);
       
   120 
       
   121 private:
       
   122 	CTestMmfAclntDRMRecorderRightsCount();
       
   123 	
       
   124 private:
       
   125 	TInt iPreviousState;
       
   126 	TInt iCurrentState;
       
   127 	TInt iError;
       
   128 	TTimeIntervalMicroSeconds iDuration;// Stores duration of audio
       
   129 	};
       
   130 
       
   131 /**
       
   132  * Load and initialise an audio file.
       
   133  *
       
   134  * @class CTestMmfAclntDRMPlayerOpen
       
   135  *
       
   136  */         
       
   137 class CTestMmfAclntDRMPlayerOpen :  public CTestMmfAclntStep, public MMdaAudioPlayerCallback
       
   138 	{
       
   139 public:
       
   140 	static CTestMmfAclntDRMPlayerOpen* NewL();
       
   141 	static CTestMmfAclntDRMPlayerOpen* NewLC();
       
   142 	virtual TVerdict DoTestStepL();
       
   143 	// from MMdaAudioPlayerCallback
       
   144     virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
       
   145     virtual void MapcPlayComplete(TInt aError);
       
   146 
       
   147 private:
       
   148 	CTestMmfAclntDRMPlayerOpen();
       
   149 	
       
   150 private:
       
   151 	TInt iError;
       
   152 	TTimeIntervalMicroSeconds iDuration;// Stores duration of audio
       
   153 	};
       
   154 
       
   155 /**
       
   156  * Load and initialise an audio file.
       
   157  *
       
   158  * @class CTestMmfAclntDRMRecorderPlay
       
   159  *
       
   160  */         
       
   161 class CTestMmfAclntDRMRecorderPlay :  public CTestMmfAclntStep, public MMdaObjectStateChangeObserver
       
   162 	{
       
   163 public:
       
   164 	static CTestMmfAclntDRMRecorderPlay* NewL();
       
   165 	static CTestMmfAclntDRMRecorderPlay* NewLC();
       
   166 	virtual TVerdict DoTestStepL();
       
   167 	// from MMdaObjectStateChangeObserver
       
   168     virtual void MoscoStateChangeEvent(CBase* aObject,TInt aPreviousState,TInt aCurrentState, TInt aErrorCode);
       
   169 
       
   170 private:
       
   171 	CTestMmfAclntDRMRecorderPlay();
       
   172 	
       
   173 private:
       
   174 	TInt iPreviousState;
       
   175 	TInt iCurrentState;
       
   176 	TInt iError;
       
   177 	TTimeIntervalMicroSeconds iDuration;// Stores duration of audio
       
   178 	};
       
   179 
       
   180 
       
   181 /**
       
   182  * Test that Audio conversion fails for protected files
       
   183  *
       
   184  * @class CTestMmfAclntDRMConverterFail
       
   185  *
       
   186  */         
       
   187 class CTestMmfAclntDRMConverterFail :  public CTestMmfAclntStep, public MMdaObjectStateChangeObserver
       
   188 	{
       
   189 public:
       
   190 	static CTestMmfAclntDRMConverterFail* NewL();
       
   191 	static CTestMmfAclntDRMConverterFail* NewLC();
       
   192 	virtual TVerdict DoTestStepL();
       
   193 	// from MMdaObjectStateChangeObserver
       
   194     virtual void MoscoStateChangeEvent(CBase* aObject,TInt aPreviousState,TInt aCurrentState, TInt aErrorCode);
       
   195 
       
   196 private:
       
   197 	CTestMmfAclntDRMConverterFail();
       
   198 	
       
   199 private:
       
   200 	TInt iPreviousState;
       
   201 	TInt iCurrentState;
       
   202 	TInt iError;
       
   203 	TTimeIntervalMicroSeconds iDuration;// Stores duration of audio
       
   204 	};
       
   205 
       
   206 #endif // __TESTDRM_H__