1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mm_plat/audio_effects_proxy_api/inc/RoomLevelProxy.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,168 @@
1.4 +/*
1.5 +* Copyright (c) 2004 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: This is the definition of the Room Level proxy class.
1.18 +*
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +#ifndef CROOMLEVELPROXY_H
1.24 +#define CROOMLEVELPROXY_H
1.25 +
1.26 +// INCLUDES
1.27 +#include <e32base.h>
1.28 +#include <RoomLevelBase.h>
1.29 +#include <mmf/common/mmfcontrollerframework.h>
1.30 +#include <CustomCommandUtility.h>
1.31 +#include "RoomLevelMessageTypes.h"
1.32 +#include <MRoomLevelObserver.h>
1.33 +#include <MAudioEffectObserver.h>
1.34 +
1.35 +// FORWARD DECLARATION
1.36 +class CRoomLevelEventObserver;
1.37 +//class CEnvironmentalReverbProxy;
1.38 +
1.39 +// CLASS DECLARATION
1.40 +
1.41 +/**
1.42 +* Interface class to be implemented by objects that receives callbacks from Room Level Event Observer.
1.43 +*
1.44 +* @since 3.0
1.45 +*/
1.46 +class MRoomLevelCallback
1.47 + {
1.48 + public:
1.49 +
1.50 + /**
1.51 + * Invoked by the RoomLevel Event Observer when the RoomLevel object changes state
1.52 + * @since 3.0
1.53 + * @param aBuffer Buffer containing the RoomLevel data
1.54 + */
1.55 + virtual void RoomLevelEvent( const TDesC8& aDataPckg ) = 0;
1.56 +
1.57 + };
1.58 +
1.59 +/**
1.60 +* This is the RoomLevel effect proxy class responsible for handling framework messages.
1.61 +*
1.62 +* @lib RoomLevelProxy.lib
1.63 +* @since 3.0
1.64 +*/
1.65 +
1.66 +class CRoomLevelProxy : public CRoomLevel,
1.67 + public MRoomLevelCallback
1.68 + {
1.69 + public: // Constructors and destructor
1.70 +
1.71 + /**
1.72 + *
1.73 + * Factory function for creating the RoomLevel proxy object.
1.74 + * @since 3.0
1.75 + * @param aMessageHandler reference to message handler
1.76 + * @param aCustomCommand reference to custom command utility
1.77 + * @return pointer to a RoomLevel proxy object
1.78 + */
1.79 + IMPORT_C static CRoomLevelProxy* NewL( TMMFMessageDestinationPckg aMessageHandler,
1.80 + MCustomCommand& aCustomCommand,
1.81 + CCustomInterfaceUtility* aCustomInterfaceUtility );
1.82 + /**
1.83 + *
1.84 + * Destructor
1.85 + */
1.86 + virtual ~CRoomLevelProxy();
1.87 +
1.88 + public: // functions from base class
1.89 +
1.90 + /**
1.91 + * From CAudioEffect
1.92 + * Apply effect settings
1.93 + * @since 3.0
1.94 + */
1.95 + IMPORT_C virtual void ApplyL();
1.96 +
1.97 +
1.98 + public: // functions from MRoomLevelCallback
1.99 +
1.100 + /**
1.101 + * From MRoomLevelCallback
1.102 + * Changes to RoomLevel data has occured
1.103 + * @since 3.0
1.104 + * @param aBuffer Buffer containing serialized RoomLevel data
1.105 + */
1.106 + void RoomLevelEvent( const TDesC8& aDataPckg );
1.107 +
1.108 +
1.109 + /**
1.110 + * Set reverb unique ID
1.111 + *
1.112 + * @since 3.0
1.113 + * @param aReverb A reference to the client reverb object
1.114 + */
1.115 + virtual TInt AttachReverb(CEnvironmentalReverb& aReverb);
1.116 +
1.117 + /**
1.118 + * Delete related message handler and custom interface
1.119 + *
1.120 + * @since 3.0
1.121 + * @param aReverb A reference to the client reverb object
1.122 + */
1.123 + virtual TInt DettachReverb(CEnvironmentalReverb& aReverb);
1.124 +
1.125 +
1.126 +
1.127 + private:
1.128 +
1.129 + /**
1.130 + * Private C++ constructor for this class.
1.131 + * @since 3.0
1.132 + * @param aMessageHandler reference to message handler
1.133 + * @param aCustomCommand reference to custom command utility
1.134 + * @return -
1.135 + */
1.136 + CRoomLevelProxy(TMMFMessageDestinationPckg aMessageHandler, MCustomCommand& aCustomCommand,
1.137 + CCustomInterfaceUtility* aCustomInterfaceUtility);
1.138 +
1.139 + /**
1.140 + * Second phase constructor for this class.
1.141 + * @since 3.0
1.142 + * @return -
1.143 + */
1.144 + void ConstructL();
1.145 +
1.146 + /**
1.147 + * Start the active observer.
1.148 + * @since 3.0
1.149 + * @param -
1.150 + * @return -
1.151 + */
1.152 + void StartObserver();
1.153 +
1.154 +
1.155 +
1.156 + private:
1.157 +
1.158 + // Pointer to custom command utility
1.159 + MCustomCommand* iCustomCommand;
1.160 + // Message handler handle
1.161 + TMMFMessageDestinationPckg iMessageHandler;
1.162 + // RoomLevel Event Observer
1.163 + CRoomLevelEventObserver* iRoomLevelEventObserver;
1.164 + // Pointer to the custom interface utility
1.165 + CCustomInterfaceUtility* iCustomInterfaceUtility;
1.166 +
1.167 + };
1.168 +
1.169 +#endif // of CROOMLEVELPROXY_H
1.170 +
1.171 +// End of File