sl@0: sl@0: // MmfGlblAudioEffectPlugin.h sl@0: 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 "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: // sl@0: sl@0: #ifndef MMFGLBLAUDIOEFFECTPLUGIN_H sl@0: #define MMFGLBLAUDIOEFFECTPLUGIN_H sl@0: sl@0: #include sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: @file sl@0: */ sl@0: sl@0: /** sl@0: Implementation of CMmfGlobalAudioEffect. sl@0: This is the base interface for plugins that provide for global effects. It is intended sl@0: to be exclusively called from CMmfGlobalAudioEffect itself. sl@0: */ sl@0: sl@0: class MMmfGlobalAudioImpl sl@0: { sl@0: friend class CMmfGlobalAudioEffect; sl@0: sl@0: public: sl@0: /** sl@0: Release object. sl@0: Equivalent of destructor - called to request data to be deleted. sl@0: */ sl@0: virtual void Release()=0; sl@0: sl@0: protected: sl@0: /* sl@0: Provide implementation of CMmfGlobalAudioEffect::Capability() sl@0: @param aCurrentOnly sl@0: If true, capabilities are for current situation only - see text sl@0: @return Capability settings, as given in TCapabilityFlags sl@0: @see CMmfGlobalAudioEffect::Capability() sl@0: */ sl@0: virtual TUint Capability(TBool aCurrentOnly)=0; sl@0: sl@0: /** sl@0: Provide implementation of CMmfGlobalAudioEffect::RequestNotificationL() sl@0: @param aEventUid sl@0: Uid specifying event for which notification is requested sl@0: sl@0: @leave KErrNotSupported sl@0: If Observer passed during construction was NULL. sl@0: The Uid is not recognised. sl@0: The feature is simply not supported in this implementation. sl@0: @see CMmfGlobalAudioEffect::RequestNotificationL() sl@0: */ sl@0: virtual void RequestNotificationL(TUid aEventUid)=0; sl@0: sl@0: /** sl@0: Provide implementation of CMmfGlobalAudioEffect::IsEnabled() sl@0: @return True if SetEnabledL(ETrue), or similar, has been called on this effect sl@0: @see CMmfGlobalAudioEffect::IsEnabled() sl@0: */ sl@0: virtual TBool IsEnabled() const=0; sl@0: sl@0: /** sl@0: Provide implementation of CMmfGlobalAudioEffect::IsActive() sl@0: @return True if the effect is in use sl@0: @see CMmfGlobalAudioEffect::IsActive() sl@0: */ sl@0: virtual TBool IsActive() const=0; sl@0: sl@0: /** sl@0: Provide implementation of CMmfGlobalAudioEffect::SetEnabledL() sl@0: @param aValue sl@0: If true, enables this specific effect. If false, disables it. sl@0: @see CMmfGlobalAudioEffect::SetEnabledL() sl@0: */ sl@0: virtual void SetEnabledL(TBool aValue)=0; sl@0: sl@0: /** sl@0: Provide implementation of CMmfGlobalAudioEffect::SettingsByUidL() sl@0: @return The Uid used by SetSettingsByUidL() sl@0: @leave KErrNotSupported sl@0: The settings cannot be expressed as a Uid (usually means SetSettingsByUidL() was not the last sl@0: thing to change them). sl@0: @see CMmfGlobalAudioEffect::SettingsByUidL() sl@0: */ sl@0: virtual TUid SettingsByUidL() const=0; sl@0: sl@0: /** sl@0: Provide implementation of CMmfGlobalAudioEffect::SetSettingsByUidL() sl@0: @param aPresetUid sl@0: Uid representing the preset in question sl@0: @leave KErrNotSupported sl@0: This implementation does not support presets for this effect sl@0: @leave KErrUnknown sl@0: The value of aUid does not correspond to a known preset sl@0: @see CMmfGlobalAudioEffect::SetSettingsByUidL() sl@0: */ sl@0: virtual void SetSettingsByUidL(TUid aPresetUid)=0; sl@0: sl@0: /** sl@0: Provide implementation of CMmfGlobalAudioEffect::SettingsByDesL() sl@0: @return HBufC8 containing current settings sl@0: @leave KErrNotSupported sl@0: This implementation does not support expressing settings in descriptor form sl@0: @see CMmfGlobalAudioEffect::SettingsByDesL() sl@0: */ sl@0: virtual HBufC8* SettingsByDesL() const=0; sl@0: sl@0: /** sl@0: Provide implementation of CMmfGlobalAudioEffect::SetSettingsByDesL() sl@0: @param aParam sl@0: Descriptor value to use sl@0: @leave KErrNotSupported sl@0: This implementation does not support expressing settings in descriptor form sl@0: @leave KErrCorrupt sl@0: Value in descriptor does not correspond to known format sl@0: @see CMmfGlobalAudioEffect::SetSettingsByDesL() sl@0: */ sl@0: virtual void SetSettingsByDesL(const TDesC8& aParam)=0; sl@0: sl@0: /** sl@0: Provide implementation of CMmfGlobalAudioEffect::KnownPresetsL() sl@0: @see CMmfGlobalAudioEffect::KnownPresetsL() sl@0: @leave KErrNotSupported sl@0: This feature may not be supported in some circumstances sl@0: */ sl@0: virtual MMmfGlobalAudioPresetList* KnownPresetsL()=0; sl@0: sl@0: /** sl@0: Provide implementation of CMmfGlobalAudioEffect::ExtractValuesL() sl@0: Extract the settings into a struct sl@0: Note that the implementation should check the size of the supplied package buffer, to check sl@0: it is as expected. sl@0: @param aPackageBuf sl@0: This should be a package buffer wrapping the appropriate class/struct, and will be sl@0: specific to a particular CMmfGlobalAudioEffect derivitive. sl@0: @leave KErrNotSupported sl@0: This will only be supported by some child classes, and even then will not sl@0: be supported by all implementations. sl@0: @leave KErrArgument sl@0: Passed package buffer is not the expected size. sl@0: @see CMmfGlobalAudioEffect::ExtractValuesL() sl@0: */ sl@0: virtual void ExtractValuesL(TDes8& aPackageBuf)=0; sl@0: sl@0: /** sl@0: Provide implementation of CMmfGlobalAudioEffect::SetByValuesL(). sl@0: Note that the implementation should check the size of the supplied package buffer, to check sl@0: it is as expected. sl@0: @param aPackageBuf sl@0: This should be a package buffer wrapping the appropriate class/struct, and will be sl@0: specific to a particular CMmfGlobalAudioEffect derivitive. sl@0: @leave KErrNotSupported sl@0: This will only be supported by some child classes, and even then will not sl@0: be supported by all implementations. sl@0: @leave KErrArgument sl@0: Passed package buffer is not the expected size, or individual values are out of range sl@0: @see CMmfGlobalAudioEffect::SetByValuesL() sl@0: */ sl@0: virtual void SetByValuesL(const TDesC8& aPackageBuf)=0; sl@0: sl@0: /** sl@0: Request extension feature. sl@0: This is intended to provide additional features, should a particular global effect sl@0: need it. In typical use, the global effect will make a call to this interface on sl@0: construction. Repeatedly calling this interface will have no additional effect - sl@0: if the interface has already been setup internally, then no further activity will sl@0: take place. sl@0: @param aInterfaceUid sl@0: Used to indicate which interface is required. sl@0: @return Standard error code. KErrNotSupported is used to indicate that the particular sl@0: plugin is used. sl@0: */ sl@0: virtual TInt CreateCustomInterface(TUid aInterfaceUid)=0; sl@0: sl@0: sl@0: /** sl@0: Return previously created extension. sl@0: This returns a custom interface, used to provide additional features for a certain sl@0: global effect. This should only be used if CreateCustomInterface() has already sl@0: been called for the same UID value. This means that any construction for that interface sl@0: has already been called, and thus this call cannot fail. Typically the returned class sl@0: will be another Mixin.No transfer of ownership is implied. sl@0: sl@0: @param aInterfaceUid sl@0: Used to indicate which interface is required. sl@0: @return The requested interface, or NULL if not known. sl@0: @see CreateCustomInterface() sl@0: */ sl@0: virtual TAny* CustomInterface(TUid aInterfaceUid)=0; sl@0: sl@0: sl@0: /** sl@0: Pass destructor key. sl@0: Called on construction so plugin takes responsibility to call REComSession::DestroyedImplementation() sl@0: @param aDestructorKey sl@0: The Uid returned by REComSession::CreateImplementationL() or similar sl@0: */ sl@0: virtual void PassDestructorKey(TUid aDestructorKey)=0; sl@0: sl@0: /** sl@0: Complete construction. sl@0: Pass additional values from the construction phase, used subsequently by the plugin. sl@0: @param aParent sl@0: The CMmfGlobalAudioEffect that created this object sl@0: @param aObserver sl@0: Observer as passed to CMmfGlobalAudioEffect::BaseConstructL() sl@0: @see CMmfGlobalAudioEffect::BaseConstructL() sl@0: */ sl@0: virtual void CompleteConstructL(CMmfGlobalAudioEffect* aParent, MMmfGlobalAudioEffectObserver* aObserver)=0; sl@0: sl@0: private: sl@0: static MMmfGlobalAudioImpl* NewL(TUid aImplementationUid, sl@0: CMmfGlobalAudioEffect* aParent, sl@0: MMmfGlobalAudioEffectObserver* aObserver); sl@0: sl@0: }; sl@0: sl@0: sl@0: #endif // MMFGLBLAUDIOEFFECTPLUGIN_