sl@0: sl@0: // Copyright (c) 2004-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 TESTGLOBALEFFECTPLUGIN_H sl@0: #define TESTGLOBALEFFECTPLUGIN_H sl@0: sl@0: #include sl@0: sl@0: #include "../src/TestEffectCustom.h" sl@0: #include "PresetList.h" sl@0: sl@0: // Test global audio effect - does nothing but supports setting, getting etc sl@0: sl@0: class CTestEffect : public CBase, sl@0: public MMmfGlobalAudioImpl, sl@0: public MTestEffectCustomIf sl@0: { sl@0: public: sl@0: static MMmfGlobalAudioImpl* NewL(); sl@0: ~CTestEffect(); sl@0: sl@0: enum TValueState sl@0: { sl@0: ESetByUnknown, sl@0: ESetByUid, sl@0: ESetByDes, sl@0: ESetByValue sl@0: }; sl@0: sl@0: protected: sl@0: // from MMmfGlobalAudioImpl sl@0: void Release(); sl@0: TUint Capability(TBool aCurrentOnly); sl@0: void RequestNotificationL(TUid aEventUid); sl@0: TBool IsEnabled() const; sl@0: TBool IsActive() const; sl@0: void SetEnabledL(TBool aBool); sl@0: TUid SettingsByUidL() const; sl@0: void SetSettingsByUidL(TUid aPresetUid); sl@0: HBufC8* SettingsByDesL() const; sl@0: void SetSettingsByDesL(const TDesC8& aParam); sl@0: MMmfGlobalAudioPresetList* KnownPresetsL(); sl@0: void ExtractValuesL(TDes8& aPackageBuf); sl@0: void SetByValuesL(const TDesC8& aPackageBuf); sl@0: TInt CreateCustomInterface(TUid aInterfaceUid); sl@0: TAny* CustomInterface(TUid aInterfaceUid); sl@0: void PassDestructorKey(TUid aDestructorKey); sl@0: void CompleteConstructL(CMmfGlobalAudioEffect* aParent, MMmfGlobalAudioEffectObserver* aObserver); sl@0: sl@0: // from MTestEffectCustomIf sl@0: void SetActive(TBool aValue); sl@0: void GenCallbackL(); sl@0: sl@0: private: sl@0: CTestEffect(); sl@0: private: sl@0: TUid iDestructorKey; sl@0: CMmfGlobalAudioEffect* iParent; sl@0: MMmfGlobalAudioEffectObserver* iObserver; sl@0: TUid iSettingsUid; sl@0: HBufC8* iSettingsDes; sl@0: TInt iSettingsValue; sl@0: TValueState iValueState; sl@0: TBool iEnabled; sl@0: TBool iIsActive; sl@0: CPresetList* iPresetList; sl@0: TUid iNotifyUid; sl@0: }; sl@0: sl@0: #endif