1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmlibs/mmfw/tsrc/mmfintegrationtest/ACLNT/TestPlayerCaps0014.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,94 @@
1.4 +
1.5 +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// under the terms of "Eclipse Public License v1.0"
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +// TestPlayerUtils.h
1.19 +// Header file: Basic tests.
1.20 +//
1.21 +//
1.22 +
1.23 +/**
1.24 + @file TestPlayerUtils.h
1.25 +*/
1.26 +
1.27 +#ifndef TESTPLAYERCAPS0014_H__
1.28 +#define TESTPLAYERCAPS0014_H__
1.29 +
1.30 +
1.31 +#include "TSI_MMFACLNT.h"
1.32 +
1.33 +
1.34 +/**
1.35 + * Load and initialise an audio file.
1.36 + *
1.37 + * @class CTestMmfAclntCaps0014
1.38 + *
1.39 + */
1.40 +class CTestMmfAclntCaps0014 : public CTestMmfAclntStep, public MMdaObjectStateChangeObserver
1.41 + {
1.42 +private:
1.43 + enum InternalState
1.44 + {
1.45 + EWaitingForServer=0,
1.46 + EInitPlayer,
1.47 + EPlaying
1.48 + };
1.49 +
1.50 +
1.51 +public:
1.52 + static CTestMmfAclntCaps0014* NewL(const TDesC& aTestName, const TDesC& aSectionName, const TDesC& aKeyName);
1.53 + static CTestMmfAclntCaps0014* NewLC(const TDesC& aTestName, const TDesC& aSectionName, const TDesC& aKeyName);
1.54 +
1.55 + ~CTestMmfAclntCaps0014();
1.56 + void Close();
1.57 + virtual TVerdict DoTestStepL();
1.58 +
1.59 + void CreatePlayer();
1.60 + void BeginPlayback();
1.61 + // from MMdaAudioPlayerCallback
1.62 +// virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds &aDuration);
1.63 +// virtual void MapcPlayComplete(TInt aError);
1.64 +
1.65 + void DoProcess(TInt aError);
1.66 +
1.67 + class CServerMonitor : public CActive
1.68 + {
1.69 + public:
1.70 + static CServerMonitor* NewL(CTestMmfAclntCaps0014* aParent);
1.71 + void ConstructL();
1.72 + void RunL();
1.73 + void DoCancel();
1.74 +
1.75 + TRequestStatus& ActiveStatus();
1.76 + private:
1.77 + CServerMonitor(CTestMmfAclntCaps0014* aParent);
1.78 + private:
1.79 + CTestMmfAclntCaps0014* iParent;
1.80 + };
1.81 +
1.82 + // from MMdaObjectStateChangeObserver
1.83 + virtual void MoscoStateChangeEvent(CBase* aObject, TInt aPreviousState, TInt aCurrentState, TInt aErrorCode);
1.84 +
1.85 +private:
1.86 + CTestMmfAclntCaps0014(const TDesC& aTestName, const TDesC& aSectionName, const TDesC& aKeyName);
1.87 +
1.88 +private:
1.89 + CMdaAudioRecorderUtility* iPlayer;
1.90 + CServerMonitor* iServerMonitor;
1.91 + TVerdict iVerdict;
1.92 +
1.93 + TBuf<KNameBufSize> iSectName; // Section name for retrieving filename
1.94 + TBuf<KNameBufSize> iKeyName; // Key name for retrieving filename
1.95 + InternalState iState;
1.96 + };
1.97 +#endif // TESTPLAYERCAPS0014_H__