1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmlibs/mmfw/tsrc/mmfintegrationtest/SDevSound/inc/TestPlayerCaps.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,92 @@
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 TESTPLAYERCAPS_H__
1.28 +#define TESTPLAYERCAPS_H__
1.29 +
1.30 +
1.31 +//#include "TSI_MMFACLNT.h"
1.32 +#include "TSI_MMF_SDEVSOUND_STEP.h"
1.33 +
1.34 +const TInt KMaxSvrMessageSize = 256;
1.35 +
1.36 +/**
1.37 + * Load and initialise an audio file.
1.38 + *
1.39 + * @class CTestMmfAclntCaps
1.40 + *
1.41 + */
1.42 +class CTestMmfAclntCaps : public CTestStepSDevSound, public MMdaAudioPlayerCallback
1.43 + {
1.44 +private:
1.45 + enum InternalState
1.46 + {
1.47 + EWaitingForServer=0,
1.48 + EInitPlayer,
1.49 + EPlaying
1.50 + };
1.51 +
1.52 +
1.53 +public:
1.54 + static CTestMmfAclntCaps* NewL(const TDesC& aTestName, const TDesC& aSectionName, const TDesC& aKeyName);
1.55 + static CTestMmfAclntCaps* NewLC(const TDesC& aTestName, const TDesC& aSectionName, const TDesC& aKeyName);
1.56 +
1.57 + ~CTestMmfAclntCaps();
1.58 + virtual TVerdict DoTestStepL();
1.59 +
1.60 + void CreatePlayer();
1.61 + void BeginPlayback();
1.62 + // from MMdaAudioPlayerCallback
1.63 + virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds &aDuration);
1.64 + virtual void MapcPlayComplete(TInt aError);
1.65 +
1.66 + void DoProcess(TInt aError);
1.67 +
1.68 + class CServerMonitor : public CActive
1.69 + {
1.70 + public:
1.71 + static CServerMonitor* NewL(CTestMmfAclntCaps* aParent);
1.72 + void ConstructL();
1.73 + void RunL();
1.74 + void DoCancel();
1.75 +
1.76 + TRequestStatus& ActiveStatus();
1.77 + private:
1.78 + CServerMonitor(CTestMmfAclntCaps* aParent);
1.79 + private:
1.80 + CTestMmfAclntCaps* iParent;
1.81 + };
1.82 +
1.83 +private:
1.84 + CTestMmfAclntCaps(const TDesC& aTestName, const TDesC& aSectionName, const TDesC& aKeyName);
1.85 +
1.86 +private:
1.87 + CMdaAudioPlayerUtility* iPlayer;
1.88 + CServerMonitor* iServerMonitor;
1.89 + TVerdict iVerdict;
1.90 +
1.91 + TBuf<KNameBufSize> iSectName; // Section name for retrieving filename
1.92 + TBuf<KNameBufSize> iKeyName; // Key name for retrieving filename
1.93 + InternalState iState;
1.94 + };
1.95 +#endif