os/boardsupport/haitest/bspsvs/suite/bsp/sound/inc/t_soundactivecallback.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 /*
     2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:
    15 *
    16 */
    17 
    18 /**
    19 @test
    20 @internalComponent
    21 
    22 This contains CT_SoundActiveCallback
    23 */
    24 
    25 #if (!defined __T_SOUNDACTIVECALLBACK_H__)
    26 #define __T_SOUNDACTIVECALLBACK_H__
    27 
    28 // User includes
    29 #include "sound_util.h"
    30 #include "ActiveCallbackBase.h"
    31 
    32 /**
    33 * Callback class for playing and recording processes
    34 */
    35 class CT_SoundActiveCallback : public CActiveCallbackBase
    36 	{
    37 public:
    38 	
    39 	/**
    40 	* Two phase constructor
    41 	*
    42 	* @leave	system wide error
    43 	*/
    44 	static CT_SoundActiveCallback*	NewL(CDataWrapperBase& aCallback, TInt aPriority=EPriorityStandard);
    45 	
    46 	/**
    47 	* Two phase constructor
    48 	*
    49 	* @leave	system wide error
    50 	*/
    51 	static CT_SoundActiveCallback*	NewLC(CDataWrapperBase& aCallback, TInt aPriority=EPriorityStandard);
    52 
    53 	/**
    54 	* Public destructor
    55 	*/
    56 	~CT_SoundActiveCallback();
    57 	
    58 	/**
    59 	* Setter method for section name
    60 	*/
    61 	void	SetSection(const TDesC& aSection);
    62 	
    63 	/**
    64 	* Method for creating sound data buffer.
    65 	*/
    66 	void	CreateSoundDataBufferL(TInt aLength);
    67 	
    68 protected:
    69 	
    70 	/**
    71 	* Protected constructor. First phase construction
    72 	*/
    73 	CT_SoundActiveCallback(CDataWrapperBase& aCallback, TInt aPriority);
    74 
    75 public:
    76 	/** Position in buffer being played or recorded to */ 
    77 	TInt						iDataPosition;
    78 	/** Buffer being played or recorded to */
    79 	TSoundUtil::RAudioBuffer* 	iSoundData;
    80 	/** Section name associated with command */
    81 	TDesC*						iSection;
    82 	/** Block in buffer */
    83 	TPtr8 						iBufferBlock;
    84 	};
    85 
    86 #endif /* __T_SOUNDACTIVECALLBACK_H__ */