sl@0: // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // e32test\multimedia\d_mmcsc.h sl@0: // The interface to a device driver which creates a shared chunk - for use with the sound driver tests. sl@0: // This driver uses only generic kernel APIs and so need not be built from each variant. sl@0: // sl@0: // sl@0: sl@0: /** sl@0: @file sl@0: @internalComponent sl@0: @test sl@0: */ sl@0: sl@0: #if !defined(__D_MMCSC_H__) sl@0: #define __D_MMCSC_H__ sl@0: sl@0: #include sl@0: #ifndef __KERNEL_MODE__ sl@0: #include sl@0: #endif sl@0: sl@0: _LIT(KDevMmCScName,"MmCSc"); sl@0: sl@0: const TInt KMmCScBufSize=153600; // 150K sl@0: const TInt KMmCScNumBuffers=8; sl@0: sl@0: struct SBufSpecList sl@0: { sl@0: /** The first entry of the buffer offset list. This list holds the offset from the start of the chunk sl@0: for each buffer. This list is only valid if the flag KScFlagBufOffsetListInUse is set in sl@0: TSharedChunkBufConfigBase::iFlags. */ sl@0: TInt iBufferOffset; sl@0: TInt iBufferId; sl@0: }; sl@0: sl@0: class TMmSharedChunkBufConfig : public TSharedChunkBufConfigBase sl@0: { sl@0: public: sl@0: /** The buffer offset list. This holds the offset from the start of the chunk for each buffer. This list is sl@0: only valid if the flag KScFlagBufOffsetListInUse is set in TSharedChunkBufConfigBase::iFlags. */ sl@0: struct SBufSpecList iSpec[KMmCScNumBuffers]; sl@0: }; sl@0: sl@0: class TCapsMmCScV01 sl@0: { sl@0: public: sl@0: TVersion iVersion; sl@0: }; sl@0: sl@0: class RMmCreateSc : public RBusLogicalChannel sl@0: { sl@0: public: sl@0: enum TControl sl@0: { EGetChunkHandle,EGetBufInfo }; sl@0: #ifndef __KERNEL_MODE__ sl@0: public: sl@0: inline TInt Open() sl@0: { return DoCreate(KDevMmCScName,TVersion(0,1,1),KNullUnit,NULL,NULL,EOwnerThread);} sl@0: inline TInt GetChunkHandle(RChunk& aChunk) sl@0: { return(aChunk.SetReturnedHandle(DoControl(EGetChunkHandle)));} sl@0: inline TInt GetBufInfo(TDes8& aBufInfo) sl@0: { return(DoControl(EGetBufInfo,(TAny*)&aBufInfo));} sl@0: #endif sl@0: }; sl@0: sl@0: #endif // __D_MMCSC_H__