1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmlibs/mmfw/tsrc/mmfintegrationtest/ACLNT/TestPlayerCaps.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,91 @@
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 +
1.33 +const TInt KMaxSvrMessageSize = 256;
1.34 +
1.35 +/**
1.36 + * Load and initialise an audio file.
1.37 + *
1.38 + * @class CTestMmfAclntCaps
1.39 + *
1.40 + */
1.41 +class CTestMmfAclntCaps : public CTestMmfAclntStep, public MMdaAudioPlayerCallback
1.42 + {
1.43 +private:
1.44 + enum InternalState
1.45 + {
1.46 + EWaitingForServer=0,
1.47 + EInitPlayer,
1.48 + EPlaying
1.49 + };
1.50 +
1.51 +
1.52 +public:
1.53 + static CTestMmfAclntCaps* NewL(const TDesC& aTestName, const TDesC& aSectionName, const TDesC& aKeyName);
1.54 + static CTestMmfAclntCaps* NewLC(const TDesC& aTestName, const TDesC& aSectionName, const TDesC& aKeyName);
1.55 +
1.56 + ~CTestMmfAclntCaps();
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(CTestMmfAclntCaps* 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(CTestMmfAclntCaps* aParent);
1.78 + private:
1.79 + CTestMmfAclntCaps* iParent;
1.80 + };
1.81 +
1.82 +private:
1.83 + CTestMmfAclntCaps(const TDesC& aTestName, const TDesC& aSectionName, const TDesC& aKeyName);
1.84 +
1.85 +private:
1.86 + CMdaAudioPlayerUtility* iPlayer;
1.87 + CServerMonitor* iServerMonitor;
1.88 + TVerdict iVerdict;
1.89 +
1.90 + TBuf<KNameBufSize> iSectName; // Section name for retrieving filename
1.91 + TBuf<KNameBufSize> iKeyName; // Key name for retrieving filename
1.92 + InternalState iState;
1.93 + };
1.94 +#endif